<template>
	<view class="pageConts">
		<mtitles bgColor="#fff" :height="safeArea?.top">
			<template v-slot:content>
				<view class="reflash_ico point"  @click.stop="doFocus">
					<input type="text" class="inputs" placeholder="搜索感兴趣的食物" confirm-type="search" @confirm="doSearchs" v-model="searchText" :focus="inputFocus"/>
					<text class="fcon-a-1" v-if="searchText==''" ></text>
					<text class="cuIcon-roundclosefill clear_icos point" v-else @click.stop="doClear"></text>
				</view>
			</template>
		</mtitles>
		<view class="invs" :style="{marginTop:`${state.customBar}px`}"></view>
		<scroll-view class="VerticalMain" scroll-y=scroll-with-animation
			:style="{height:`calc(100vh - ${state.customBar+1}px)`,paddingBottom:totalAmount>0?'140rpx':''}">
			<empty positions="absolute" :empty="loaded&&searchList.length<=0" zIndexs="99"
				:imgUrl="env.FileUrl+'food/empty/images/empty_ico06.png'" content="无搜索结果">
			</empty>
			<view v-for="(items,indexs) in searchList" :key="indexs" style="position: relative;">
				<view class="cu-bar" v-for="(item,index) in items.sgoodsList" :key="index" @click.stop="tapShopItem(item)">
				<view v-if="item.shopType != '2'"
					style="width: 100%;display: flex;justify-content: space-between;">
					<image :src="env.FileUrl+'food/images/ico_bao.png'" class="immsb" v-if="item.shopTop=='1'">
					</image>
					<view class="showImgs">
						<tb-image width="100%" height="100%" borderRadius="26rpx"
							:src="imgBaseUrl+item.vmaster_product_image_id">
							<template v-slot:error>
								<image src="../../../static/menuEmpty.png" class="imms" mode="aspectFill">
								</image>
							</template>
						</tb-image>
						<view class="hy text-center" v-if="item.isVip=='1'">
							<text class="fcon-cvip hs_s"></text>
						</view>
						<view class="spcPrice" v-if="item.activityType=='243'">
							<text class="fcon-Vector1 spcPrice_icons"></text>
						</view>
						<view class="sellOut" v-if="item.total_nsell_nums<='0'&&cartStore.curOrderType.type == ''&&item.shopType!='1'">已售罄</view>
					</view>
					<view class="shopinfo" :style="{width:'440rpx'}">
						<view class="shopinfo-shopname">{{item.name}}</view>
						<view class="showinfo-tag">
							<view class="kcal" v-for="(it,ind) in item.tags" :key="ind">{{it}}</view>
						</view>
						<view class="sales_box">
							<view class="sales_box_item"
								v-if="item.warnNums!='0'&&item.shopType!='1'&&cartStore.curOrderType.type == ''&&item.nsell_nums<=item.warnNums&&item.total_nsell_nums&&item.total_nsell_nums!='0'&&item.nsell_nums>0">
								仅限{{item.nsell_nums}}份</view>
							<view class="sales_box_item" v-if="item.defaultLabel">
								{{item.defaultLabel}}
								</view>
							<view class="sales_box_item" v-if="item.cupText>0&&item.isVip=='1'">券后{{item.cupText}}折
							</view>
						</view>
						<view class="show-price">
							<view class="price">
								<text>¥{{item.activity ? item.activity_price : (shopStore.costPlan == '1130' ? item.site_sell_price??0 : item.out_sell_price??0)}}</text>
								<text class="totalReduce"  v-if="item.shopType!='1'">¥{{item.totalReduce||0}}</text>
								<text v-else  class="totalReduceTc">起</text>
							</view>
							<view v-if="item.shopType=='1'"	 @click.stop="toTcMenus(item)" class="point priceCommon priceBtnAv">
								选规格
								<uni-badge class="uni-badge-left-margin total" :text="item.num"
									absolute="rightTop" :offset="[0, -23]" size="normal">
								</uni-badge>
							</view>
							<view v-else-if="item.specsOnly == '1' || item.shopType=='2'" :class="{
											priceBtnAv: userVip && item.isVip == '1'&&getAddnums(item),
											priceBtnAvs: !userVip && item.isVip == '1'||!getAddnums(item),
											priceBtnAU: item.isVip == '0'&&getAddnums(item)
										}" @click.stop="openModel(item,$event)" class="point priceCommon">
								选规格
								<uni-badge class="uni-badge-left-margin total" :text="item.num"
									absolute="rightTop" :offset="[0, -23]" size="normal">
								</uni-badge>
							</view>
							<block v-else>
								<uni-number-box v-if="getAddnums(item)" class="numbx priceCommon"
									v-model="item.num" :min="0" :max="getMaxNum(item)" margin="0 -7rpx"
									:allowInput="true" @getEvn="addCar($event, item)"
									@delEvn="delCar($event, item)" />
								<view v-else class="prUnis flex flex-direction justify-center align-center" @click.stop="stopPrevent">
									<text class="cuIcon-add" style="font-size: 40rpx; color: #666"></text>
								</view>
							</block>
						</view>
					</view>
					</view>
					<view v-if="item.shopType == '2'" class="dtgoods">
						<view class="showImgs_mup">
							<tb-image width="100%" height="226rpx" borderRadius="26rpx"
								:src="imgBaseUrl+item.vmaster_product_image_id">
								<template v-slot:error>
									<image src="../../../static/menuEmpty.png" class="imms" mode="aspectFill">
									</image>
								</template>
							</tb-image>
						</view>
					</view>
				</view>
			</view>
		</scroll-view>
		<view class="balance_box" @touchmove.stop.prevent="stopPrevent"
			:style="{opacity:totalAmount>0 ? shopStyleOp:'0 !important'}"
			:animation="animationAllboxDataf" v-if="!shopStore.hasShut || cartStore.curOrderType.type!=''">
			<view class="mj_box" v-show="cartStore.cartTags&&showMj"
				:style="{bottom:totalAmount>0?(isPhonex?'105rpx !important':'105rpx !important'):'-100rpx'}">
				<text>{{cartStore.cartTags}}</text>
			</view>
			<view class="bottom_balance point">
				<view class="ba_left" :animation="animationDataL">
					<view class="ba_left_c"></view>
					<view class="ba_left_cc" @click="showCoupon">
						<view class="my_q" :style="{marginTop:submitData.totalCoupsNums>0?'':'20rpx'}">我的券</view>
						<view class="q_toal" v-if="submitData.loaded&&submitData.totalCoupsNums>0">
							<text class="text-right-xs text-bold text-sm">
								{{submitData.totalCoupsNums||0}}张
								<!-- <text v-if="submitData.nums>0">可用</text> -->
							</text>
							<!-- coupUsed -->
						</view>
					</view>
				</view>
				<view class="ba_right" :animation="animationData">
					<view class="ba_r_box">
						<view class="ba_right_c" :class="isActBox==true?'acti':''" :animation="animationDatax"
							:style="{backgroundColor:totalAmount=='0'?'#989898':'#231F20'}"></view>
						<view class="ba_ri_con" v-if="totalAmount!=0">
							<view class="hasCar_l flex-sub" @click="tapShopList">
								<view class="imagess">
									<image :src="env.FileUrl+'food/ico/images/car_ico001.png'"
										style="width: 100%;height: 100%;" mode="aspectFill">
									</image>
									<uni-badge class="uni-badge-left-margin total" :text="totalAmount"
										absolute="rightTop" :offset="[3, -40]" size="normal">
									</uni-badge>
								</view>
								<view class="hasCar_l_info flex-sub flex flex-direction justify-center lh_z">
									<view class="info_pri flex align-center">
										<view>
											<text class="text-df">¥</text>
											<text style="font-size:48rpx;">{{submitData.totalPayPrice||0}}</text>
										</view>
										<view @click.stop="tapShowDisModel">
											<view v-if="submitData.totalBackPrice>0">
												<!-- <text class="yh">已优惠 submitData.totalBackPrice</text> -->
												<text
													class="text-xs margin-left-xs yh">已优惠{{submitData.totalBackPrice||0}}元</text>
												<!-- <text class="text-xs text-c9 margin-left-xs textLineTh">¥{{submitData.totalSellerPrice||0}}</text> -->
												<text :class="nowShowicon" v-if="submitData.totalBackPrice>0"
													style="color:#fff; margin-left: 5rpx;font-size: 20rpx;"></text>
											</view>
											<view class="text-c9 text-xs" style="margin-top:18rpx"
												v-if="submitData.carriage>0&&submitData.totalPrice>=shopStore.startDeliveryAmount">
												<text class="margin-left-xs">含配送费</text>
												<text
													class="margin-left-xs">¥{{totalAmount>0?(submitData.carriage||0):0}}</text>
												<!-- <text :class="nowShowicon" v-if="submitData.totalBackPrice>0" style="color:#fff; margin-left: 5rpx;font-size: 20rpx;"></text>	 -->
											</view>

										</view>

									</view>
									<view v-if="submitData.disVAmout>0" class="yunf margin-top-xxs"
										@click.stop="tapShowDisModel">
										<!-- 超出{{submitData.vipAllowTotalPrice}}元按原价计算 -->
										<!-- <view class="yunf_outpri">已优惠{{submitData.totalBackPrice||0}}元<text v-if="submitData.disVAmout>0">（VIP优惠{{submitData.disVAmout}}元）</text></view> -->
										<view class="yunf_outpri">VIP专区优惠{{submitData.disVAmout}}元</view>
									</view>
								</view>
							</view>
							<view class="hasCar_r isNullCar_r point" @click="toJs"
								v-if="submitData.totalPrice>=shopStore.startDeliveryAmount">
								<text v-if="isSpo">选好了</text>
								<text v-else>去结算</text>
							</view>
							<view class="difPrice" v-else>
								差¥{{transQsPrice((shopStore.startDeliveryAmount-submitData.totalPrice))}}起送
							</view>
						</view>
						<view class="ba_ri_con" v-else>
							<view class="isNullCar_l flex align-center">
								<view class="null_tips">
									未选购菜品
								</view>
							</view>
							<view class="isNullCar_r" style="margin-right:40rpx">
								去下单
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="balance_shut"
			v-if="!(!shopStore.hasShut || ((cartStore.curOrderType.type!=''&&shopStore.shutStates!='stops') && shopStore.shutStates!='beyonDdistance'))"
			:style="{bottom:isPhonex?'0rpx !important':'0rpx !important'}">
			<view class="shut_image" v-if="shopStore.shutStates!='beyonDdistance'">
				<image :src="iconUrl+'shop_closed01.png'" style="width: 100%;height:100%"></image>
			</view>
			<view class="shut_conts" v-if="shopStore.shutStates=='opens'">
				<view class="shut_cont_left">
					<text class="left_c_t">本店已打烊</text>
					<text class="left_c_d">营业时间：{{shopStore.shutTimes}}</text>
				</view>
				<!-- <view class="shut_btns" @click="yudActions">去预定</view> -->
			</view>
			<view class="shut_conts" v-if="shopStore.shutStates=='stops'">
				<view class="shut_cont_left">
					<text class="left_c_t">暂停营业</text>
				</view>
				<view class="closeShop_text"
					@click.stop="goSobotUrl('https://yek-ddx.soboten.com/chat/h5/v6/index.html','69b4825bbba8408b883962c570a6287f')">
					<text class="fcon-my-08 kf_ico"></text>
					<view class="kf_texts">联系客服</view>
					<!-- 	{{shopStore.shutPhone}}
					<view class="closeShop_tel">
						<text class="fcon-dianhua tel_icons"></text>
					</view> -->
				</view>
			</view>
			<view class="shut_contsBy" v-if="shopStore.shutStates=='beyonDdistance'">
				<view class="center_text">无法配送到当前位置</view>
				<view class="center_by_btn" @click.stop="showPop('orderAgainRef','menu')">更换收货地址</view>
			</view>
		</view>
		<!-- 规格选择弹窗中间弹出 -->
		<speciModal ref="popup1" @submit="doSubmit"></speciModal>
		<!-- 预定弹窗 :content="timesContent"-->
		<!-- <delivery-time-op @dataCallback="dataCallback" @timeCallback="timeCallback" dodge ref='reserve' :barHidth='860'
			title="选择预送达时间" source="menuYd" @maskClose="maskCloseDeltime">
		</delivery-time-op> -->
		<!-- 购物车弹窗 -->
		<carLiist ref="carListRef" @carNumChanges="getShopNums" :isPhonex="isPhonex"
			:getCoupons="couponRef?couponRef.getCoupons:null" :getVCoupons="couponRef?couponRef.getVCoupons:null"
			@maskClick="maskClick('carListRef')" @clearCloseModal="isNullCa" @change="changeTotal" uSource="searchMenu"/>
		<!-- 价格明细弹窗 -->
		<diskPopup ref="diskModelRef" :detail="submitData" :isPhonex="isPhonex"
			@maskClick="maskClick('diskModelRef')" uSource="searchMenu"/>
		<!-- 优惠券弹窗 -->
		<coupon ref="couponRef" type="menu" :coupUseMoney="submitData.coupUseMoney" @change="changeCoupons" />
		<!-- 选择门店弹窗 -->
		<!-- <checkDoor ref="checkedDoorRef" @storeChecked="storeChecked" /> -->
		<!-- 饮食习惯弹窗 -->
		<!-- <habit ref="habitRef" @choseTase="choseTase" /> -->
		<!-- 微信账单同步 -->
		<!-- <billModels ref="billRef" @sendOrder="sendOrder" /> -->
		<!-- 退出拼单确认-->
		<!-- <canelSpoMo ref="canelSpoRef" @spoCanel="spoCanel" /> -->
		<!-- 领券-->
		<!-- <getCoups ref="getCoupsRef" :isPhonex="isPhonex" @hasGet="hasGetCups" /> -->
		<!-- 是否有主食 -->
		<mianMenu ref="mianMenuRef" @backActs="backActs" />
		<!-- 再来一单 -->
		<!-- <orederAgain ref="orderAgainRef" @changeSt="changeSt" :isPhonex="isPhonex" :addData="orderDetialParams" /> -->
		<view class="ballShow">
			<carShow ref="ballRef" :duration="700" :size="30" />
		</view>
		<tb-privacy ref="prcy" :onNeed='true'></tb-privacy>
		<loading></loading>
		<!-- <tabbar :thisCurrent="curRoute"></tabbar> -->
	</view>
</template>

<script setup lang="ts">
	import { nextTick, reactive, ref, toRaw, watch, computed } from 'vue';
	import { onShow, onLoad, onShareAppMessage } from '@dcloudio/uni-app';
	import { showLoading, hideLoading, mnavTo, trailingThrottle, checkLogin, getCurRoute, getSystemPhoneX, checkOrg } from '@/utils/helper';
	import { initShop, getSellerConfig, takeSaveShare } from '@/utils/public';
	import { getSearch,getTemplate, queryNutrients, getShareDetail, queryDistance, editCart, getCartList, shopcartAdd, getCartNums, shopcartDdxGoods, dxGoodsDetial, shopcartDel, addVipGood, collectStore, cancelCollectStore, getStoreList, getDateList, getMyLikeGoodsList, getMemberInfo, queryMenuPromotion, queryMenuPromotionList } from '@/api/vmeitime-http/index.js'
	import mapi from '@/utils/mapi';
	import { env } from '@/api/env.js'
	// import dragButtons from "@/components/dragButton/drag-button.vue"
	import carLiist from "@/pages/index/menu/carlist.vue"
	import diskPopup from "@/pages/index/menu/discounts.vue"
	import coupon from "@/pages/index/menu/coupon.vue"
	import speciModal from '@/components/speciModal/speciModal.vue'
	import carShow from '@/uni_modules/lime-ball/components/l-ball/l-ball.vue'
	import mianMenu from '@/pages/index/menu/mainMenu.vue';
	import { useCartStore } from '@/stores/cartStore';
	import { useShopStore } from '@/stores/shopStore';
	import { useUserStore } from '@/stores/commonStore';
	import global from '@/utils/global';
	const { safeArea } = uni.getWindowInfo();
	const isPhonex = ref<any>(false)
	const scustomBarTop = ref<any>(0)
	const topSwiperList = ref<any>([])
	const isLogin = ref(false)  //是否登录
	const isLoginflag = ref(false)
	let state = reactive({
		statusBar: 0,
		customBar: 0,
	})
	const inputFocus=ref(false)
	const searchText=ref('')
	const coupsList = ref<any>([
		//"870":全场通用,"869":商品券 ,'868':现金券
		// coupon_type_two:==970?折:元,
		// allowReceive:是否可以领取
	])
	const coupLength = ref()
	const prcy = ref();
	const cartStore = useCartStore();
	const shopStore = useShopStore();
	const userStore = useUserStore();
	const colorArrs = ref(['#5DB075', '##DDEEE5'])
	const rangeArr = ref([180, -180])
	const queryNutrientsList = ref([])
	const imgBaseUrl = ref(env.imgBaseUrl)
	const iconUrl = ref(env.FileUrl + "food/ico/images/")
	const loadedList = ref(false)//是否加载
	//当前登录用户信息
	const loginUserInfo = ref({
		userName: "Jun",
		userId: "100001"
	})
	// const getVCoupons = ()=>{
	// 	return couponRef.value.getVCoupons
	// } 
	// function getVCoupons() {
	//   console.log('Method called');
	// }
	//当前拼单人员列表
	const spoUserList = ref([
		{
			userName: "Jun",
			userId: "100001",
			userAut: imgBaseUrl.value + "ushead.png",//用户头像
		}, {
			userName: "Jun",
			userId: "100002",
			userAut: imgBaseUrl.value + "car_img01.png",//用户头像
		}
	])
	const vipTipShow = ref(false)
	const ballRef = ref()
	const billRef = ref()
	const canelSpoRef = ref()
	const habitRef = ref()
	const orderAgainRef = ref()
	const storeSc = ref(false)
	const nowHobit = ref("地中海饮食")
	const isCollection = ref(true)
	const storeInfo = ref()
	const checkedDoorRef = ref()
	const tabsRef = ref()
	const carListRef = ref()
	const tabCur = ref(0)
	const stabCurs = ref(0)
	const getCoupsRef = ref()
	const mianMenuRef = ref()
	const goodDtAddcars=ref()
	const costPlan = ref<any>([])
	// [
	// 	// {
	// 	// 	id: '1130',
	// 	// 	name: '堂食'
	// 	// },
	// 	// {
	// 	// 	id: '1131',
	// 	// 	name: '外卖'
	// 	// },
	// 	// {
	// 	// 	id: '1120',
	// 	// 	name: '自取'
	// 	// }
	// ]
	const shopCarStyles = ref("10rpx !important")
	const shopStyleOp = ref("1 !important")
	const nowSwitch = ref('1131')
	const orderDetialParams = ref<any>()
	const totalAmount = ref(0)//点单个数
	// const totalPay = ref("999.99")//总费用
	// const deliveryFee = ref("99.99")//配送费
	const stabCur = ref(0)
	const mainCur = ref(0)
	const leftMain = ref(0)
	const sepCurrent = ref(0)//规格单选
	const sepCurrentxc = ref(0)//香菜
	const sepCurrentld = ref(0)//辣度
	const redEnvImg = ref(env.FileUrl + 'food/ico/images/dc_coup01.png')
	const popup1 = ref()
	const reserve = ref()
	const load = ref(true)
	const splModel = ref()//拼单弹窗
	const diskModelRef = ref()//优惠明细弹窗
	const couponRef = ref()//优惠券
	//中间列表联动
	const verticalNavTop = ref(0)
	const billCheck = ref(true) //拼单-是否同步至微信账单
	const isSpo = ref(false)//是否属于拼单状态
	const isSpoPay = ref('0')//拼单状态支付方式
	// const showUnbalanc = ref(true)
	const nowShowicon = ref('cuIcon-fold')
	const longitude = ref()  //经纬度
	const latitude = ref()  //经纬度
	const searchList = ref([])
	const loaded = ref(false)
	// let state = reactive({
	// 	latitude: 28.208399,
	// 	longitude: 113.06463,
	// 	mapLatitude: 28.208399,
	// 	mapLongitude: 113.06463,
	// 	covers: [],
	// 	scale: 14, //地图层级，取值范围为5-18，默认16，14最优，11看长沙市
	// })
	const addressStore = ref() //选中的门店位置
	const nowPlan = ref({
		storeName: "",
		distance: '719m',
		time: '',
		phone: '',
		address: '',
		nsell_member_id: '',
		attentionGoodsId: ''
	})
	const addressInfo = ref("湖南省长沙市芙蓉区亚大陆87号")
	const menuType = ref(["普餐", "VIP专区"])
	const vipCur = ref(0)
	const isLike = ref([])
	const userVip = ref(true)//当前登录用户是否是vip
	const list = ref<any>([])
	const tablist = ref([
		{
			id: '0',
			name: "外卖"
		}, {
			id: '1',
			name: "预定"
		}, {
			id: '2',
			name: "我喜欢的"
		}
		// , {
		// 	id: '3',
		// 	name: "拼单"
		// }
	])
	// shopType: "0",  //"0"单品,"1",套餐
	// shopTop: "0",  //'0'表示非爆品'爆品','1'表示爆品
	// isVip: "0",//'0'表示非vip,'1'表示vip
	// specsOnly:"1",//'0'表示只有1个规格,'1'表示又多个规格
	const shopist = ref<any>([])
	const nowPickvalue = ref('')//预定选择的时间
	const changeDrag = ref(false)
	const showNav = ref(false)
	const suBtnKcal = ref("0")
	const dragDirect = ref('left')
	const showMj = ref(false)
	// 动画定义开始
	//最右边parent盒子变化
	const caranimation = ref<any>()
	const animationData = ref({})
	//最右边倾斜盒子变化
	const caranimationx = ref<any>()
	const animationDatax = ref({})
	const isActBox = ref(false)
	//最左边盒子动画
	const caranimationL = ref<any>()
	const animationDataL = ref({})
	const animationLef = ref<any>()
	const animationDataLef = ref({})

	//购物车整体显示隐藏
	const animationAllbox = ref<any>()
	const animationAllboxDataf = ref({})
	// 动画定义结束
	const dragList = ref<any>(
		{
			fixexData: [
				// {
				// 	value: "0",
				// 	name: "膳食纤维",
				// 	backImgs: iconUrl.value + "car_bg04.png"
				// }, {
				// 	value: "0",
				// 	name: "碳水",
				// 	backImgs: iconUrl.value + "car_bg05.png"
				// }, {
				// 	value: "0",
				// 	name: "脂肪",
				// 	backImgs: iconUrl.value + "car_bg06.png"
				// },
			],
			changeData: [
				// {
				// 	value: "9",
				// 	name: "食物种类",
				// }, {
				// 	value: "5",
				// 	name: "维C",
				// }, {
				// 	value: "6",
				// 	name: "钙",
				// }, {
				// 	value: "18",
				// 	name: "铁",
				// }, {
				// 	value: "152",
				// 	name: "维A",
				// }
			]
		}
	)
	const timesContent = ref<any>([{
		"timezh": "今天 (周三)",
		"timeformatter": "8-10",
		"id": 108,
		"timelist": [{
			"timestr": "立即送达",
			"deliveryfee": "18元配送费",
		}, {
			"timestr": "15:35 - 16:00",
			"deliveryfee": "2元配送费",
		}, {
			"timestr": "16:05 - 16:30",
			"deliveryfee": "2元配送费",
		}, {
			"timestr": "16:35 - 17:00",
			"deliveryfee": "2元配送费",
		}, {
			"timestr": "17:05 - 18:00",
			"deliveryfee": "2元配送费",
		}, {
			"timestr": "18:35 - 19:00",
			"deliveryfee": "3元配送费",
		}, {
			"timestr": "19:05 - 19:30",
			"deliveryfee": "4元配送费",
		}, {
			"timestr": "19:35 - 20:00",
			"deliveryfee": "4元配送费",
		}]
	}])
	//卡路里进度条图表
	const chartData = ref({
		series: [
			{
				name: "Kcal",
				color: "#5DB075",
				data: 0.6
			}
		]
	})
	const opts = ref({
		color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", "#ea7ccc"],
		padding: undefined,
		title: {
			name: '',
			fontSize: 16,
			color: '#333',
			fontWeight: 600
		},
		subtitle: {
			name: '(Kcal)',
			fontSize: 10,
			color: '#53A87F',
			offsetY: 12,
		},
		extra: {
			arcbar: {
				type: "default",
				width: 5,
				backgroundColor: "#E9E9E9",
				startAngle: 0.75,
				endAngle: 0.25,
				gap: 2,
				linearType: "none",
				// radius: 260
			}
		}
	})
	watch(
		() => tabCur.value, // 观察的源
		(newValue) => {
			// cartStore.setCurOrderTypeString(newValue == 1 ? 'SUBSCRIBE' : '')
			// console.log(`Count changed from ${oldValue} to ${newValue}`);
		}
	);

	const makeCall = (phoneNumber : any) => {
		uni.makePhoneCall({
			phoneNumber: phoneNumber,
			success: () => {
				console.log('拨打电话成功');
				// storeInfo.value.close()
			},
			fail: () => {
				console.log('拨打电话失败');
			}
		})
	}
	//收藏
	const collectionBtn = () => {
		// isCollection.value = !isCollection.value
		if (!addressStore.value.attentionGoodsId) {
			console.log('收藏-------------------------', addressStore.value.attentionGoodsId)
			getCollection()
		} else {
			console.log('取消收藏')
			// isCollection.value = false
			cancelCollection()
		}
	}
	//收藏接口
	const getCollection = async () => {
		try {
			showLoading()
			let res = await collectStore({
				vtype: '835',
				vobject_id: addressStore.value.nmember_id
			})
			if (res.object.pushCache) {
				hideLoading();
				mapi.msg('收藏成功!');
				// Collection.value = true
				// nowPlan.value.attentionGoodsId = res.object.attention_goods_id
				addressStore.value.attentionGoodsId = res.object.attention_goods_id
				console.log('收藏01', res)
			}
		} catch (e) {
			hideLoading();
			mapi.msg('收藏失败!');
		}
	}
	//取消收藏
	const cancelCollection = async () => {
		try {
			showLoading()
			let res = await cancelCollectStore({
				attentionGoodsId: addressStore.value.attentionGoodsId
			})
			if (res.object) {
				hideLoading();
				mapi.msg('取消收藏成功!');
				// isCollection.value = true
				// Collection.value = false
				console.log('收藏00', res)
			}
			addressStore.value.attentionGoodsId = res.object.attention_goods_id
			// nowPlan.value.attentionGoodsId = null 
		} catch (e) {
			hideLoading();
			mapi.msg('收藏失败!');
		}
	}

	const tabSelect = (item : any, index : any) => {
		closeDrag()
		// hidePop('orderAgainRef')
		// orderDetialParams.value={}
		// await getSellerConfig()
		if (item.id != '2') {
			uni.removeStorageSync('menuact')
		}
		console.log('tab', item.id)
		if (item.id != '1') {
			tablist.value[1].name = "预定"
			nowPickvalue.value = ''
			cartStore.setCurOrderTypeString('')
		}
		tabCur.value = index;
		initData('tap')
		// nowSelectpan.value = item
	}

	const changeSwitch = (item : any, index : any) => {
		if (item.id == nowSwitch.value) {
			return
		}
		nowSwitch.value = item.id;
		shopStore.setCostPlan(item.id);
		// if (item.id == "1131") {
		// 	// mnavTo('/pages/others/addressList/addressList')
		// 	nowSwitch.value = item.id;
		// 	cartStore.setCostPlan(item.id)
		// } else {
		// 	mapi.msg('暂未开通！')
		// 	return
		// 	// showPop('checkedDoorRef')
		// 	// checkedDoorRef.value.openDialog()
		// }
		if (tabCur.value != 2) {
			getGoodsDet()
		}

	}
	// const leftRepeat = ref(false);
	const tabSelecLeft = (e : any, index : any, item : any = {}, shopId : any, isHid : any, source : any = '', shockSource : any = '') => {
		console.log()
		if (isHid == '') {
			closeDrag()
		}
		// stabCurs.value
		if (shockSource == 'clicks') {
			uni.vibrateShort();
			// if(leftRepeat.value){
			// 	console.log('重复')
			// 	return
			// }
			// leftRepeat.value = true
			// setTimeout(()=>{
			// 	leftRepeat.value = false
			// },500)
		}
		stabCur.value = index;
		if (
			(item.children?.length > 0 && (Number(item.children[0].nsell_category_id) < 0 || Number(shopId) < 0)) ||
			(item.children?.length == 1 && item.name == item.children[0].vname)
		) {
			let e = {
				currentTarget: {
					dataset: {
						id: item.children[0].nsell_category_id
					}
				}
			};
			changescIndex(e, "", "");
		}

		if (item.children && item.children.length == 0) {
			let e = {
				currentTarget: {
					dataset: {
						id: item.id
					}
				}
			};
			changescIndex(e, "", "");
		}

		list.value[index].showChild = !list.value[index].showChild

		if (list.value[index].showChild) {
			const query = uni.createSelectorQuery();
			query.select(('#lefid' + index)).boundingClientRect(); // 选择类名为my-element的元素
			query.exec((res) => {
				if (res[0]) {
					// item && item.children && item.children.length > 0 && (Number(item.children[0].nsell_category_id) < 0)
					if ((item && item.children && item.children.length > 0 && (Number(item.children[0].nsell_category_id) < 0) || (item && item.children && item.children.length == 1 && item.name == item.children[0].vname))) {
						list.value[index].height = 0
					} else if (Number(shopId) < 0) {
						list.value[index].height = 0
					} else {
						list.value[index].height = res[0].height
					}
				}
			});
		} else {
			// lefAnimationChange(0)
			list.value[index].height = 0;
		}
		for (let i in list.value) {

			if (i != index) {
				list.value[i].showChild = false
				list.value[i].height = 0
			}
		}

	}

	const changescIndex = (e : any, index : any, item : any, shockSource : any = '') => {
		if (shockSource == 'clicks') {
			// if(leftRepeat.value){
			// 	console.log('重复')
			// 	return
			// }
			// leftRepeat.value = true
			// setTimeout(()=>{
			// 	leftRepeat.value = false
			// },300)
			uni.vibrateShort();
		}
		// closeDrag()//暂7拖拽球
		stabCurs.value = e.currentTarget.dataset.id
		mainCur.value = e.currentTarget.dataset.id;
		verticalNavTop.value = (e.currentTarget.dataset.id - 1) * 50
	}
	const tabLeftMenu = trailingThrottle(tabSelecLeft, 80);
	const tabLeftSubMenu = trailingThrottle(changescIndex, 80);
	// const tapLeftMenu = trailingThrottle(tabSelecLeft, 300);
	const VerticalMain = (e : any) => {
		mainCur.value = 0
		if (e.detail.scrollTop == 0) {
			leftMain.value = list.value?.length > 0 ? list.value[0].parentIds : ''
		}
		let tabHeight = 0;
		if (load.value) {
			for (let i = 0; i < shopist.value.length; i++) {
				let view = uni.createSelectorQuery().select("#main-" + shopist.value[i].id);
				view.fields({
					size: true
				}, (data : any) => {
					shopist.value[i].top = tabHeight;
					tabHeight = tabHeight + data.height;
					shopist.value[i].bottom = tabHeight;
				}).exec();
			}
			load.value = false
		}
		let scrollTop = e.detail.scrollTop + 10;
		for (let i = 0; i < shopist.value.length; i++) {
			if (scrollTop > shopist.value[i].top && scrollTop < shopist.value[i].bottom) {
				verticalNavTop.value = (shopist.value[i].id - 1) * 50
				stabCurs.value = shopist.value[i].id
				leftMain.value = shopist.value[i].id
				const result = findParentIndexById(list.value, shopist.value[i].id)
				if (result !== null) {
					if (typeof list.value[result].height === 'undefined' || list.value[result].height == 0) {
						if (!(list.value[result].children && list.value[result].children.length == 1 && list.value[result].name == list.value[result].children[0].vname)) {
							tabSelecLeft("", result, "", shopist.value[i].id, 'hids')
						} else {
							tabSelecLeft("", result, "", "-" + shopist.value[i].id, 'hids')
						}

					}
				}
				return false
			}
		}
	}
	const findParentIndexById = (items : any, id : any) => {
		let result = null;
		items.forEach((parent : any, parentIndex : any) => {
			parent.children.forEach((child : any) => {
				if (child.nsell_category_id == id) {
					result = parentIndex;
				}
			});
		});
		return result;
	}


	const openModel = (item : any, e : any) => {
		closeDrag()
		// if(shopStore.hasShut&&cartStore.curOrderType.type==''&&shopStore.shutStates!='opens'){
		// 	return
		// }
		let result = item.specList && item.specList.some((it : any) => Number(it.num ?? 0) < Number(it.nsell_nums))
		if (!result && cartStore.curOrderType.type == '') {
			return
		}
		if (shopStore.shutStates != 'opens' && shopStore.hasShut) {
			return
		}
		if (shopStore.shutStates == 'opens' && shopStore.hasShut && tabCur.value == 0) {
			return
		}
		if (vipCur.value == 1 && !userVip.value) {
			return
		}
		if (!userVip.value && item.isVip == '1') {
			return
		}
		if (item.shopType == '0') {
			// showPop('popup1')
			popup1.value.open(item, e)//规格选择弹窗
		} else {
			mnavTo(item.shopType == '1' ? '/pages/order/singleMeal/singleMeal?goodsId=' + item.goods_id : '/pages/order/goodsDetial/goodsDetial?shopType=' + item.shopType + "&goodsId=" + item.goods_id + "&goodsSku=" + item.sku)
		}

	}
 const toTcMenus=(item:any)=>{
	 mnavTo(item.shopType == '1' ? '/pages/order/singleMeal/singleMeal?goodsId=' + item.goods_id : '/pages/order/goodsDetial/goodsDetial?shopType=' + item.shopType + "&goodsId=" + item.goods_id + "&goodsSku=" + item.sku)
 }
	const changeCun = (item : any, index : any, names : any) => {
		if (names == "gg") {
			sepCurrent.value = index
		} else if (names == "sc") {
			sepCurrentxc.value = index
		} else if (names == "ld") {
			sepCurrentld.value = index
		}
	}

	const doSubmit = (item : any) => {
		// addCar("", item)
		addShop(item.e, item.result)
		hidePop('popup1')
	}
	// 分享好友
	onShareAppMessage(() => {
		return new Promise(async (resolve, reject) => {
			let param = {
				event_id: '19', //事件id  1:会员注册, 2:H5分享， 3:商品价格标签, 4:商品超链接分享, 5:拼团， 6:线下团购,7.总部推广 ,8.VIP专属卡,9.预留1,10.预留2
				source_type: '1', //1首页分享，2商品分享，3名片分享，4商品超链接分享5拼团,6线下团购,7.总部推广 ,8.VIP专属卡,9.预留1,10.预留2
				goods_id: '',
				goods_sku: '',
				activity_id: '',
				sell_member_id: shopStore.curSellerMemberId || '', //门店id
				// buy_member_id: paramData.buy_member_id || '', //用户id
			}
			try {
				let shareId = await takeSaveShare(param)
				if (shareId) {
					const imageUrl = uni.getStorageSync('shareImg')
					const shareTits = uni.getStorageSync('shareTitles')
					let msg = {
						title: shareTits || '好食材 健康外卖',
						content: '好食材 健康外卖',
						path: '/pages/index/menu/menu?scene=' + shareId,
						imageUrl: imageUrl || 'https://cdn-static.yekjx.com/resouces/daiyan/xyyy_share.png',
					}
					resolve(msg)
				} else {
					reject('');
					mapi.msg('分享失败,请稍后重试')
				}
			} catch (e) {
				reject('');
				mapi.msg('分享失败,请稍后重试')
				console.error(e)
				//TODO handle the exception
			}

		});
	});
	const optParams = ref<any>({});
	onLoad((options) => {
		const deviceInfo = uni.getDeviceInfo()
		const systemSetting = uni.getSystemSetting()
		const windowInfo = uni.getWindowInfo()
		let e={...deviceInfo,...systemSetting,...windowInfo}
				// #ifndef MP
				state.statusBar = Number(e.statusBarHeight);
				if (e.platform == 'android') {
					state.customBar = Number(e.statusBarHeight) + 50;
				} else {
					state.customBar = Number(e.statusBarHeight) + 45;
				}
				// #endif
				// #ifdef MP-WEIXIN
				state.statusBar = Number(e.statusBarHeight);
				let custom = wx.getMenuButtonBoundingClientRect();
				state.customBar = custom.bottom + custom.top - Number(e.statusBarHeight);
				// #endif
				// #ifdef MP-ALIPAY
				// state.statusBar = Number(e.statusBarHeight);
				// state.customBar = Number(e.statusBarHeight) + Number(e.titleBarHeight);
				// #endif
		// uni.getSystemInfo({
		// 	success: function (e) {
		// 		// #ifndef MP
		// 		state.statusBar = Number(e.statusBarHeight);
		// 		if (e.platform == 'android') {
		// 			state.customBar = Number(e.statusBarHeight) + 50;
		// 		} else {
		// 			state.customBar = Number(e.statusBarHeight) + 45;
		// 		}
		// 		// #endif
		// 		// #ifdef MP-WEIXIN
		// 		state.statusBar = Number(e.statusBarHeight);
		// 		let custom = wx.getMenuButtonBoundingClientRect();
		// 		state.customBar = custom.bottom + custom.top - Number(e.statusBarHeight);
		// 		// #endif
		// 		// #ifdef MP-ALIPAY
		// 		state.statusBar = Number(e.statusBarHeight);
		// 		state.customBar = Number(e.statusBarHeight) + Number(e.titleBarHeight);
		// 		// #endif
		// 	}
		// })
		// nowPickvalue.value = ''
		// cartStore.setCurOrderTypeString('')
		isPhonex.value = getSystemPhoneX();
		shopCarStyles.value = isPhonex.value ? '150rpx !important' : '120rpx !important';
		optParams.value = options
		let caranimations = uni.createAnimation({
			duration: 500,
			timingFunction: 'ease',
		})
		let caranimationsx = uni.createAnimation({
			duration: 500,
			timingFunction: 'ease',
			transformOrigin: "right bottom"
		})
		let caranimationsL = uni.createAnimation({
			duration: 400,
			timingFunction: 'ease'
		})
		let animationsLef = uni.createAnimation({
			duration: 200,
			timingFunction: 'ease-out'
		})
		let animationsAllLef = uni.createAnimation({
			duration: 500,
			timingFunction: 'ease-in-out'
		})
		caranimation.value = caranimations
		caranimationx.value = caranimationsx
		caranimationL.value = caranimationsL
		animationLef.value = animationsLef
		animationAllbox.value = animationsAllLef
	})
	const curRoute = ref('')
	onShow(async () => {
		// shopStore.setHasShut(false);
		// shopStore.setShutStates('opens');
		curRoute.value = getCurRoute();

		// loadedList.value && 
		// carListRef.value
		// if (tabCur.value != 1) {
		// 	cartStore.setCurOrderType('')
		// 	nowPickvalue.value = ''
		// }
		console.log('optParams.value', optParams.value)
		if (optParams.value.scene) {
			try {

				// let shreS= decodeURIComponent(optParams.value.scene)
				let sdetail = await getShareDetail({ share_id: optParams.value.scene })
				if (sdetail.result && sdetail.object) {
					let nres = JSON.parse(sdetail.object.request_params);
					console.log('getShareDetail', nres);
					let nparam = {
						shareMemberId: '',
						buy_member_id:nres.buy_member_id||'',
						sellMemberId: nres.sell_member_id || '',//暂
						share_id: optParams.value.scene || '',
						event_id_1: nres.event_id || ''
					}
					shopStore.setQrShop(nres.sell_member_id || '')
					checkOrg(nparam)
					initShop(loadData, { source: 'onshow', show: true });
					return
				}
				initShop(loadData, { source: 'onshow', show: true });
			} catch (e) {
				initShop(loadData, { source: 'onshow', show: true });
				console.error(e);
			}
			return
		}

		isLogin.value = uni.getStorageSync(global.IS_LOGIN) || false;
		// if (isLogin.value && isLoginflag.value) {
		// 	storeInfo.value.open()
		// 	getLocationData()
		// 	isLoginflag.value = false
		// }

		nextTick(() => {
			prcy.value.checkPrivacySetting();
			// initShop(loadData, { source: 'onshow', show: true });
			// initCurOrderTime()
			// closeDrag()
			if(searchList.value.length>0){
				checkLogin() && getShopNums();
			}
		})
	});
	const cacheSource = ref('')//缓存来源
	const loadData = async (param : any = {}) => {
		// let customE = uni.getSystemInfoSync();
		// scustomBarTop.value = Number(customE.statusBarHeight) + 43;
		// initStatus();

		// const sres : any = await getSellerConfig();//获取当前门店配送方式-堂食/外卖/自提
		// console.log('loadData+++', sres);
		// costPlan.value = sres.list;
		// nowSwitch.value = sres.fid;
		// getNuters()//热量推荐
		// initOrderOnemore()
		// getSwipers()
		// if (cacheSource.value == 'addCarsDet' || cacheSource.value == 'addTCars') {
		// 	cartStore.setCurOrderTypeString('')
		// 	tablist.value[1].name = '预定'
		// 	nowPickvalue.value = ""
		// 	tabCur.value = 0;
		// }
		// if (cacheSource.value == 'addCars') {
		// 	if (cartStore.curOrderType.type) {
		// 		tabCur.value = 1;
		// 	} else {
		// 		cartStore.setCurOrderTypeString('')
		// 		tablist.value[1].name = '预定'
		// 		nowPickvalue.value = ""
		// 		tabCur.value = 0;
		// 	}
		// }
		// cacheSource.value != 'myLike' && cacheSource.value != 'addCars' || list.value.length==0 ? await getGoodsDet() : ''
		// cacheSource.value != 'myLike' && cacheSource.value!='addCars' ? await getGoodsDet() : ''
		// getSalesPromotion()//顶部-促销活动
		// checkLogin()&&getShopNums()
		// tabCur.value==0
		// vipCur.value
		// switch (cacheSource.value) {
		// 	case 'yuding':
		// 		initData('onshow')//数据请求后执行
		// 		loadDetail.value.loaded && showPop('reserve')
		// 		break;
		// 	case 'changeVip':
		// 		initMenu()
		// 		break;
		// 	case 'tejia':
		// 		let cindex = list.value.findIndex((item : any) => item.name.includes('特价'));
		// 		if (cindex == -1) {
		// 			return
		// 		}
		// 		let propsItem = list.value[cindex]
		// 		!list.value[cindex].showChild && tabSelecLeft('', cindex, propsItem, '', '')
		// 		leftMain.value = list.value[cindex].parentIds
		// 		if (Number(propsItem.id) > 0) {
		// 			let e = {
		// 				currentTarget: {
		// 					dataset: {
		// 						id: propsItem.children && propsItem.children[0].nsell_category_id
		// 					}
		// 				}
		// 			};
		// 			changescIndex(e, "", "")
		// 		}
		// 		break;
		// 	case 'myLike':
		// 		tabCur.value = 2
		// 		getMyFavGoods()
		// 		break;
		// 	//单套餐添加购物车
		// 	case 'addTCars':
		// 		getShopNums('addTCars')
		// 		break;
		// 	//其他页面加入购物车统一路径
		// 	case 'addCars':
		// 		let addCarPams = uni.getStorageSync('menuact').shopResult
		// 		if(addCarPams.vtwo_type=='816'){
		// 			 checkYd()
		// 		}
		// 		addShop('', addCarPams, 'addCars');
		// 		break;
		// 	case 'addCarsDet':
		// 		let addCarPamsOrd = uni.getStorageSync('menuact').shopResult
		// 		orderDetialParams.value = addCarPamsOrd
		// 		addCarEvents()
		// 		break;
		// 	default:
		// 		break;
		// }
		// uni.removeStorageSync('menuact')
		// let actCach = uni.getStorageSync('menuact')//其他页加入购物车
		// let hidCath = uni.getStorageSync('hib')//饮食习惯弹窗
		// let spoCath = uni.getStorageSync('isSpo')//是否在拼单状态

		// if (!hidCath.hibName) {
		// 	setTimeout(() => {
		// 		showPop("habitRef")//饮食习惯弹窗
		// 	}, 500)

		// }

		// if (spoCath.spoState) {
		// 	tabCur.value = 3
		// 	!shopist.value.length && initData('3', 'onshow')
		// 	uni.removeStorageSync('menuact')
		// 	return
		// }

		// if (!actCach.source) {
		// 	// nowSwitch.value = 0
		// 	// tabCur.value = 0
		// 	// stabCur.value = 0
		// 	// sepCurrent.value = 0
		// 	stabCurs.value = 0
		// 	isSpo.value = false
		// 	pageInfo.value.curPage = 1
		// 	pageInfo.value.backCurPage = 2
		// 	changeVip(0)
		// }
		// switch (actCach.source) {
		// 	case 'home':
		// 		if (actCach.action == 'yuding') {
		// 			// tabCur.value = 0
		// 			// stabCur.value = 0
		// 			// sepCurrent.value = 0
		// 			changeVip(0)
		// 			initData('1', 'onshow')
		// 		}
		// 		if (actCach.action == 'changeVip') {
		// 			// tabCur.value = 0
		// 			// stabCur.value = 0
		// 			// sepCurrent.value = 0
		// 			initMenu()
		// 			changeVip(1)
		// 		}
		// 		if (actCach.action == 'tejia') {
		// 			changeVip(0)
		// 			// tabCur.value = 0
		// 			// stabCur.value = 0
		// 			// sepCurrent.value = 0
		// 			let cindex = list.value.findIndex(item => item.id == '8')
		// 			!list.value[cindex].showChild && tabSelecLeft(cindex)
		// 		}
		// 		break;
		// 	case 'goodDetail':
		// 		carListRef.value.setData({
		// 			id: "0",
		// 			shopname: "鹿甲二仙煲",
		// 			imgurl: imgBaseUrl.value + "car_img04.png",
		// 			kcal: "999",
		// 			sweet: "中甜",
		// 			fat: "高脂",
		// 			hasDishes: "3",
		// 			evaluate: "11位回头客喜欢了",
		// 			price: "34.0",
		// 			totalReduce: "43.0",
		// 			limited: "100",
		// 			shopType: "1",  //"0"单品,"1",套餐
		// 			shopTop: "0",
		// 			isVip: "0",
		// 			specsOnly: "1",
		// 			num: "1"
		// 		})
		// 		break;
		// 	default:

		// 		break;
		// }
	}
	// const getSellerConfig = async () => {
	// 	return new Promise(async (resolve, reject) => {
	// 		//[{id: '1130',name: '堂食'},{id: '1120',name: '自取'},{id: '1131',name: '外卖'}]
	// 		const dfarr = [{id: '1130',name: '堂食'},{id: '1131',name: '外卖'}];
	// 		try {
	// 			let res = await getMemberInfo({ memberId: shopStore.curSellerMemberId })
	// 			if (!res.result||!res.object) {
	// 				resolve(dfarr)
	// 				return
	// 			}
	// 			const scopeMapping = {
	// 				"1120": { id: '1120', name: '自取' },
	// 				"1130": { id: '1130', name: '堂食' },
	// 				"1131": { id: '1131', name: '外卖' }
	// 			};
	// 			let nr = [],nsc = res.object.scope||'';

	// 			const scopeArray = nsc.split(',');
	// 			let h = scopeArray.some(itm=>itm&&itm==cartStore.costPlan)
	// 			nowSwitch.value = h?cartStore.costPlan:'1131';//初始化选中缓存/默认
	// 			if (scopeArray.includes("1130")) nr.push(scopeMapping["1130"]); // 堂食
	// 			if (scopeArray.includes("1131")) nr.push(scopeMapping["1131"]); // 外卖
	// 			if (scopeArray.includes("1120")) nr.push(scopeMapping["1120"]); // 自取
	// 			resolve(nr)
	// 		} catch (e) {
	// 			reject(dfarr);
	// 		}
	// 	});

	// }
	const loadDetail = ref({
		loaded: true,//是否加载
		time: new Date().getTime()//时间
	})
	const closeDrag = () => {
		if (showNav.value) {
			showNav.value = !showNav.value
		}
	}
	const checkYd=()=>{
		tabCur.value = 1;
		tablist.value[1].name =cartStore.curOrderType.time.timezh
		nowPickvalue.value = cartStore.curOrderType.time.dateString
		cartStore.setCurOrderTypeString('SUBSCRIBE')
		showMj.value=false
		getGoodsDet()
		// showPop('reserve')
	}
	const initData = (source : any) => {

		// tabCur.value==0
		// vipCur.value
		// 备用 onshow间隔10s才刷新
		// if (loadDetail.value.loaded) {
		// 	tabCur.value == 1 && setTimeout(() => {
		// 		showPop('reserve')
		// 		// reserve?.value?.open()
		// 		// initPickdate()

		// 	}, 0)
		// }
		if (source == 'tap') {
			// tabsRef.value.init()
			switch (tabCur.value) {
				case 0:
					getGoodsDet()
					break;
				case 1:
					loadDetail.value.loaded && showPop('reserve')
					break;
				case 2:
					getMyFavGoods()//我喜欢的
					uni.setStorageSync('menuact', { id: "4", sourec: "menu", action: "myLike" })
					break;
				default:
					break;
			}
			if (tabCur.value != 1) {
				nowPickvalue.value = ''
			}
		}

	}
	// 我喜欢列表
	const getMyFavGoods = async () => {
		showLoading()
		try {
			loadedList.value = false;
			shopist.value = [];
			list.value = [];
			let res = await getMyLikeGoodsList({ curPage: 1, pageSize: 999, sellerMemberId: shopStore.curSellerMemberId });
			let nres = res.object || [];
			loadedList.value = true;

			if (!res.result || !res.object || nres.length <= 0) {
				hideLoading();
				return
			}
			let resulFinal = {
				vname: "",
				sgoodsList: [],
				id: 0,
			}
			for (let i of res.object) {
				resulFinal.sgoodsList.push({
					...i,
					shopType: i.vtwo_type == '813' ? '1' : i.vtwo_type == '814' ? '2' : '0',//813单套 814多套
					// shopMultiple: i.vtwo_type == '814' ? '1' : '0',
					isVip: i.vipFlag == '5' ? '1' : '0',
					shopTop: i.hotCake,
					specsOnly: (i.specList && i.specList.length > 1) || i.spickLabelFlag ? '1' : '0',
					num: 0,
					tags: i.goodsLabels ? i.goodsLabels.split(",") : [],
					id: i.nsell_category_id,
					totalReduce: i.activity ? (nowSwitch.value == '1130' ? i.site_sell_price : i.out_sell_price) : i.old_price,
					// price: i.activity ? i.activity_price : (nowSwitch.value == '1130' ? i.site_sell_price : i.out_sell_price),
					limited: i.nsell_nums || 0,
					issellOut: i.nsell_nums && i.nsell_nums > 0 ? '1' : '0',
					cupText: getCupText(i)
				})
			}

			shopist.value.push(resulFinal)
			console.log(shopist.value, "shopist.value")
			syncActions()
		} catch (e) {
			shopist.value = [];
			list.value = [];
			//TODO handle the exception
			hideLoading()
		}

	}
	const initStatus = () => {

		let actCach = uni.getStorageSync('menuact') || {};//其他页加入购物车
		// let hidCath = uni.getStorageSync('hib');//饮食习惯弹窗
		let storeSy = uni.getStorageSync("checkedDoor")
		let spoCath = uni.getStorageSync('isSpo');//是否在拼单状态
		// let addResInfo = uni.getStorageSync('userInfos')
		// let choseStore = uni.getStorageSync('lastSelectedItem');//选择的门店
		// if (shopStore.shopInfo&&shopStore.shopInfo.nmember_id) {
		// 	let result = choseStore.vnick.length > 6 ? choseStore.vnick.substring(3) : choseStore.vnick
		// 	nowPlan.value.storeName = result
		// 	nowPlan.value.distance = choseStore.distance + choseStore.distanceUnit
		// 	nowPlan.value.time = `${choseStore.vstartTime}-${choseStore.vendTime}`
		// 	nowPlan.value.address = choseStore.vaddress
		// 	nowPlan.value.phone = choseStore.vphone
		// 	nowPlan.value.nsell_member_id = choseStore.nmember_id
		// 	nowPlan.value.attentionGoodsId = choseStore.attentionGoodsId
		// }
		// if (addResInfo) {
		// 	let result = JSON.parse(uni.getStorageSync('userInfos')).curSelecAdress
		// 	addressInfo.value = result.vaddre_detail
		// }
		cacheSource.value = '';
		// if (!hidCath.hibName) {
		// 	setTimeout(() => {
		// 		showPop("habitRef")//饮食习惯弹窗
		// 	}, 500)

		// }
		if (!storeSy) {
			setTimeout(() => {
				showPop("checkedDoorRef")
			}, 200)
		} else {
			hidePop("checkedDoorRef")
		}
		// uni.removeStorageSync('menuact')
		cacheSource.value = actCach.action || '';
		tabCur.value = spoCath.spoState ? 3 : cacheSource.value == 'yuding' ? 1 : (nowPickvalue.value ? 1 : 0);//顶部
		// stabCur.value = 0;//左侧
		// stabCurs.value = 0;//左侧
		sepCurrent.value = 0;//规格
		vipCur.value = actCach.action == 'changeVip' ? 1 : (actCach.action == 'addCars' ? (actCach.shopResult.isVip == '0' ? 0 : 1) : 0);//vip选项
		actCach.action == 'changeVip' && !userVip.value ? vipTipShow.value = true : ''
		hidePop('reserve')
		// cartStore.curOrderType.type
		// uni.removeStorageSync('menuact')

		// if (spoCath.spoState) {
		// tabCur.value = 3
		// !shopist.value.length && initData('3', 'onshow')
		// }
	}

	const gotoMap = (item : AnyObject) => {
		uni.openLocation({
			longitude: Number(item.vgps.split(',')[0]),
			latitude: Number(item.vgps.split(',')[1]),
			scale: 17, //5-18，默认18
			name: item.vnick,
			address: item.vaddress
		});
	}

	const getGoodsDet = async () => {
		showLoading()
		let type = vipCur.value == 0 ? '1128' : '1129';
		try {
			loadedList.value = false;
			const res = await dxGoodsDetial({ vType: type, sellMemberId: shopStore.curSellerMemberId, checkTime: nowPickvalue.value, serviceType: nowSwitch.value })
			// !checkLogin() && hideLoading();
			hideLoading();
			loadedList.value = true;
			if (res.result) {
				list.value = [];
				shopist.value = [];
				load.value = true;
				mainCur.value = 0
				leftMain.value = 0
				for (let k = 0; k < res.object.length; k++) {
					let item = res.object[k]
					let childName = item.childList && item.childList.map((childN : any) => {
						return {
							...childN,
							childNames: getNameTags(childN.vname || ''),
							vname: conName(childN.vname || '')
						}
					})
					list.value.push({
						nickNames: item.vname ? getNameTags(item.vname) : [],
						name: conName(item.vname || ''),
						imgurl: item.vlogo ? env.imgBaseUrl + item.vlogo : '',
						id: item.nsell_category_id,
						children: childName || [],
						showChild: false,
						parentIds: item.childList && item.childList.length > 0 ? item.childList[0].nsell_category_id : 'f' + k,
						topLabels: item.labels || ''
					})
					if (!item.childList) {
						continue;
					}
					for (let j = 0; j < item.childList.length; j++) {
						let it = item.childList[j];
						let vname = it.nsell_category_id == '-1' ? '热销' : (it.nsell_category_id == '-2' ? '常点' : (it.nsell_category_id == '-3' ? '特价' : conNameReplace(it.vname || '')))
						let sgoodsList = []
						let id = it.nsell_category_id
						let parentid = it.nparent_sell_category_id
						if (!it.goodList) {
							continue;
						}
						for (let m = 0; m < it.goodList.length; m++) {
							let i = it.goodList[m];
							sgoodsList.push({
								...i,
								shopType: i.vtwo_type == '813' ? '1' : i.vtwo_type == '814' ? '2' : '0',//813单套 814多套
								// shopMultiple: i.vtwo_type == '814' ? '1' : '0',
								// isVip: vipCur.value == 0 ? '0' : (i.vipFlag == '6' ? '0' : '1'),
								isVip: i.vipFlag == '5' ? '1' : '0',
								shopTop: i.hotCake,
								specsOnly: (i.specList && i.specList.length > 1) || i.spickLabelFlag ? '1' : '0',
								num: 0,
								tags: i.goodsLabels ? i.goodsLabels.split(",") : [],
								// id: i.nsell_category_id,
								totalReduce: i.activity ? (nowSwitch.value == '1130' ? i.site_sell_price : i.out_sell_price) : i.old_price,
								// price: i.activity ? i.activity_price : (nowSwitch.value == '1130' ? i.site_sell_price : i.out_sell_price),
								limited: i.nsell_nums || 0,
								issellOut: i.nsell_nums && i.nsell_nums > 0 ? '1' : '0',
								cupText: getCupText(i)
							})
						}
						sgoodsList.length > 0 && shopist.value.push({
							vname,
							sgoodsList,
							id,
							parentid
						})
					}
				}
				checkLogin() && getShopNums();
			} else {
				hideLoading()
				shopStore.curSellerMemberId && mapi.msg("网络繁忙，请稍后再试!")
			}
		} catch (e) {
			console.error(e)
			shopStore.curSellerMemberId && mapi.msg("网络繁忙，请稍后再试!")
			loadedList.value = true
			hideLoading()
		}
	}
	const getCupText = (i : any) => {
		// let result = i.activity ? ((i.activity_price ?? 0) / (i.old_price ?? 0) * 100).toFixed(0) : (nowSwitch.value == '1130' ? ((i.site_sell_price ?? 0) / (i.old_price ?? 0) * 100).toFixed(0) : ((i.out_sell_price ?? 0) / (i.old_price ?? 0) * 100).toFixed(0))
		let result = ((i.activity ? (i.activity_price ?? 0) / (nowSwitch.value == '1130' ? (i.site_sell_price ?? 0) : (i.out_sell_price ?? 0)) : 0) * 100).toFixed(0)
		if (Number(result) >= 100) {
			return 0
		}
		const numberStr = result.toString();
		const lastDigit = numberStr[numberStr.length - 1];
		if (lastDigit === '0') {
			return numberStr[0];
		} else {
			return numberStr;
		}
	}
	const getShopNums = async (source : any = '') => {
		// let params : any = {}
		// cartStore.curOrderType && cartStore.curOrderType.type ? params.patten = cartStore.curOrderType.type : ''
		// cartStore.curOrderType && cartStore.curOrderType.type ? params.subsTime = cartStore.curOrderType.time.dateString : ''

		// let res = await getCartNums(params)
		// totalAmount.value = res.object
		// if (res.object == 0) {
		// 	hidePop('carListRef')
		// }
		syncActions(source)

	}
	// 表格数据
	const recTotalEnergy = ref(0);
	const getChartData = (name : any = '', enyRate : any = 0) => {
		// let t = 0,s=0,r=0;
		// t = getRecom('protein') + getRecom('fat') + getRecom('edible_oil') + getRecom('salt');		
		chartData.value.series[0].data = enyRate;
		opts.value.title.name = name;
	}
	const syncActions = async (source : any = '') => {
		try {
			let res = await carListRef.value.initCar(source);
			suBtnKcal.value = res.totalEnergy || 0;
			if (source == 'addCars' || source == 'orderDetials' || source == 'addTCars') {
				carAnimationBegin()
				showMj.value = false
			} else if (source == 'carlist') {
				showMj.value = false
			} else {
				showMj.value = true
			}
			getChartData(res.totalEnergy ? String(res.totalEnergy) : '0', res.enyRate || 0)
			dragList.value.fixexData = [
				{
					value: res.totalProtein,
					name: "蛋白质",
					backImgs: iconUrl.value + "car_bg04.png"
				},
				{
					value: res.totalFat,
					name: "脂肪",
					backImgs: iconUrl.value + "car_bg04.png"
				},
				{
					value: res.totalEdibleOil,
					name: "油",
					backImgs: iconUrl.value + "car_bg05.png"
				}, {
					value: res.totalSalt,
					name: "盐",
					backImgs: iconUrl.value + "car_bg06.png"
				}
			]
			let mergedData = {};
			res.list.forEach((item : any) => {
				if (mergedData[item.goods_id]) {
					mergedData[item.goods_id].num += item.num;
				} else {
					mergedData[item.goods_id] = { goods_id: item.goods_id, num: item.num, sku: item.sku };
				}
			});
			let result : any = Object.values(mergedData);

			let spcMergedData = {}
			res.list.forEach((item : any) => {
				if (spcMergedData[item.sku]) {
					spcMergedData[item.sku].num += item.num;
				} else {
					spcMergedData[item.sku] = { num: item.num, sku: item.sku };
				}
			});
			let resultSpc : any = Object.values(spcMergedData);
			try {
				searchList.value.forEach((shopItem : any) => {
					shopItem.sgoodsList.forEach((shopItemA : any) => {
						const nindex = result.findIndex((resItem : any) => shopItemA.goods_id == resItem.goods_id);
						shopItemA.num = nindex >= 0 ? result[nindex].num : 0;
					});
					shopItem.sgoodsList.forEach((shopItemB : any) => {
						shopItemB.specList?.forEach((item : any) => {
							const nindexs = resultSpc.findIndex((resItems : any) => item.sku == resItems.sku);
							item.num = nindexs >= 0 ? resultSpc[nindexs].num : 0;
						});
					});
				});
				// let bandegArray = shopist.value.map((item : any) => {
				// 	let totalNums = item.sgoodsList.reduce((sum : any, current : any) => sum + current.num, 0);
				// 	return {
				// 		parentid: item.parentid,
				// 		totalNums: totalNums
				// 	};
				// });
				// list.value = list.value.map(item => {
				// 	let matchedItem = bandegArray.find(r => r.parentid == item.id);
				// 	return {
				// 		...item,
				// 		num: matchedItem ? matchedItem.totalNums : 0
				// 	};
				// });
			} catch (e) {
				console.error(e)
			}

			hideLoading()
		} catch (e) {
			hideLoading()
		}

		// res.list.forEach((resItem:any) => {
		//   let nindex = shopist.value.findIndex((shopItem:any) => shopItem.goods_id === resItem.goods_id);
		//   shopist.value[nindex].num = nindex>=0?resItem.num:0;
		//   console.log('syncActions',nindex, shopist.value[nindex]);
		// })

	}
	// const initMenu = () => {
	// 	// let cindex = list.value.findIndex(item => item.children && item.children.length > 0)
	// 	// cindex >= 0 && !list.value[cindex].showChild ? tabSelecLeft("", cindex, "", "", "") : ''

	// };

	// const dragTouchend = (params : any) => {
	// 	dragDirect.value = params.direction;
	// }
	// const tapToggleDrag = () => {
	// 	showNav.value = !showNav.value
	// 	changeDrag.value = true;
	// 	setTimeout(() => {
	// 		changeDrag.value = false;
	// 	}, 10);
	// }
	// const getClass = () => {
	// 	if (showNav.value == false) {
	// 		if (dragDirect.value == 'left') {
	// 			return 'transform: rotateY(360deg);'
	// 		} else {
	// 			return 'transform: rotateY(180deg);'
	// 		}
	// 	}
	// 	if (showNav.value == true) {
	// 		if (dragDirect.value == 'left') {
	// 			return 'transform: rotateY(180deg);'
	// 		} else {
	// 			return 'transform: rotateY(360deg);'
	// 		}
	// 	}
	// }
	//隐藏导航-7
	const hidenNavBar = () => {
		uni.hideTabBar({
			animation: false, // 是否需要动画效果
			success: () => {
			},
			fail: (err) => {
			}
		});
	}
	//显示导航-7
	const showNavBar = () => {
		uni.showTabBar({
			animation: true,
			success: () => {
			},
			fail: (err) => {
				console.error('操作失败', err);
			}
		});
	}
	const modelChange = (e : any) => {
		if (e.show) {
			hidenNavBar()
		} else {
			setTimeout(() => {
				showNavBar()
			}, 200)
		}
	}
	// 点击购物车
	const tapShopList = () => {

		curPop.value == 'carListRef' ? hidePop('carListRef', 'links') : showPop('carListRef')

	}
	//点击底部价格
	const tapShowDisModel = () => {
		if (curPop.value != 'diskModelRef' && submitData.value.totalBackPrice <= 0) {
			return
		}
		curPop.value == 'diskModelRef' ? hidePop('diskModelRef', 'links') : showPop('diskModelRef')


	}
	const transQsPrice = (num : any) => {
		if (Number.isInteger(num)) {
			return num; // 如果是整数，直接返回
		} else {
			return num.toFixed(2); // 否则，保留两位小数
		}
	}
	const vipSelects = ref<Record<string, any>>({
		totalNum: 0,
		sList: [],
		canUse: false,
		totalMoney: 0,
		disVAmout: 0,
		allTotalMoney: 0,
		allowVipTotalPrice: 0
	})//资格券选中
	const couponSelects = ref<Record<string, any>>({})//代金券选中
	// 确认优惠券
	const changeCoupons = (e : any) => {
		let { curVCoupon, curCoupon } = e.value
		couponSelects.value = curCoupon || {};//已选券
		vipSelects.value = curVCoupon || {};//资格券
		carListRef.value.changeCoupons(e);
		console.log('changecurVCoupon00', e, curVCoupon)
		console.log('changeCoupons00', curCoupon)
	}
	const curPop = ref('');//当前打开弹窗
	// const prePop = ref('');
	const showPop = (source : string, params : any = '') => {
		// closeDrag()
		curPop.value = source;
		switch (source) {
			case 'popup1':
				popup1.value?.open()//规格选择弹窗
				break;
			case 'reserve':
				reserve.value?.open()//预定选择弹窗
				break;
			case 'carListRef':
				carAnimationBegin()
				hidePop('diskModelRef')
				hidePop('couponRef')
				nowShowicon.value == 'cuIcon-unfold' ? nowShowicon.value = 'cuIcon-unfold' : '';
				showMj.value = false
				carListRef.value?.open()//购物车弹窗
				break;
			case 'diskModelRef':
				carAnimationBegin()
				hidePop('carListRef')
				hidePop('couponRef')
				nowShowicon.value = 'cuIcon-unfold';
				showMj.value = false
				diskModelRef.value?.open()//价格明细弹窗
				break;
			case 'couponRef':
				couponRef.value?.open(submitData.value.vipAllTotalMoney > 0 ? 1 : 0)//优惠券弹窗
				break;
			case 'checkedDoorRef':
				checkedDoorRef.value?.openDialog()//选择门店弹窗
				break;
			case 'habitRef':
				// habitRef.value?.open()//饮食习惯弹窗
				break;
			case 'billRef':
				billRef.value?.open()//同步账单
				break;
			case 'canelSpoRef':
				canelSpoRef.value?.open()
				break;
			case 'getCoupsRef':
				getCoupsRef.value?.open(params)
				break;
			case 'mianMenuRef':
				mianMenuRef.value?.open()
				break;
			case 'orderAgainRef':
				orderAgainRef.value?.open(params)
				break;
			default:
				break;
		}

	}
	const hidePop = (source : string, type : any = '') => {
		console.log('关闭弹窗', source, type);
		switch (source) {
			case 'popup1':
				popup1.value?.close()//规格选择弹窗
				break;
			case 'reserve':
				reserve.value?.close()//预定选择弹窗
				// tabsRef.value.init()
				break;
			case 'carListRef':
				curPop.value && (curPop.value == 'diskModelRef' || curPop.value == 'carListRef') && type != '' ? carAnimationEnd() : ''
				// curPop.value && curPop.value =='carListRef'? carAnimationEnd() : ''
				showMj.value = curPop.value == 'diskModelRef' ? false : true
				carListRef.value?.close()//购物车弹窗
				break;
			case 'diskModelRef':
				nowShowicon.value = 'cuIcon-fold'
				curPop.value && (curPop.value == 'carListRef' || curPop.value == 'diskModelRef') && type != '' ? carAnimationEnd() : ''
				// curPop.value && curPop.value =='diskModelRef'? carAnimationEnd() : ''
				showMj.value = curPop.value == 'carListRef' ? false : true
				diskModelRef.value?.close()//价格明细弹窗
				break;
			case 'couponRef':
				couponRef.value?.close()//优惠券弹窗
				break;
			case 'checkedDoorRef':
				checkedDoorRef.value?.closeDialog()//选择门店弹窗
				break;
			case 'habitRef':
				habitRef.value?.close()//饮食习惯弹窗
				break;
			case 'billRef':
				billRef.value?.close()//同步账单
				break;
			case 'canelSpoRef':
				canelSpoRef.value?.close()
				break;
			case 'getCoupsRef':
				getCoupsRef.value?.close()
				break;
			case 'mianMenuRef':
				hidePop('carListRef')
				hidePop('diskModelRef')
				curPop.value && curPop.value == 'diskModelRef' || curPop.value == 'carListRef' ? carAnimationEnd() : ''
				mianMenuRef.value?.close()
				break;
			case 'orderAgainRef':
				orderAgainRef.value?.close()
				break;
			default:
				break;
		}
		curPop.value && curPop.value == source ? curPop.value = '' : ''
	}
	const showCoupon = () => {

		showPop('couponRef')
	}
	// 购物车弹窗关闭
	const maskClick = (source : string) => {
		switch (source) {
			case 'carListRef':
				carAnimationEnd()
				nowShowicon.value = 'cuIcon-fold';
				showMj.value = curPop.value == 'diskModelRef' ? false : true
				//购物车弹窗
				break;
			case 'diskModelRef':
				carAnimationEnd()
				nowShowicon.value = 'cuIcon-fold';
				showMj.value = curPop.value == 'carListRef' ? false : true
				//价格明细弹窗
				break;
			// case 'couponRef':
			// 	//优惠券弹窗
			// 	break;
			// case 'checkedDoorRef':
			// 	//选择门店弹窗
			// 	break;
			// case 'habitRef':
			// 	//饮食习惯弹窗
			// 	break;
			default:
				break;
		}
		curPop.value ? curPop.value = '' : ''
		console.log('maskClick关闭', source, curPop.value)

	}


	const tapShopItem = (item : any) => {
		closeDrag()
		if (item.shopType == '1' || item.shopType == '2') {
			// showPop('popup1')
			mnavTo(item.shopType == '1' ? '/pages/order/singleMeal/singleMeal?goodsId=' + item.goods_id : '/pages/order/goodsDetial/goodsDetial?shopType=' + item.shopType + "&goodsId=" + item.goods_id + "&goodsSku=" + item.sku)
			return
		}
		// let overSendDis=orderDetialParams.value&&orderDetialParams.value.shopParams?.length>0?''
		mnavTo('/pages/order/goodsDetial/goodsDetial?shopType=' + item.shopType + "&goodsId=" + item.goods_id)

	}
	const navTo = (url : string) => {
		uni.navigateTo({
			url
		})
	}
	//门店位置
	// const showStore = () => {
	// 	closeDrag()
	// 	// shopStore.shopInfo  逻辑待++++  shopStore.curSellerMemberId
	// 	// console.log(' nowPlan.value.nsell_member_id------------------------------', shopStore.shopInfo.nmember_id,shopStore.curSellerMemberId, shopStore.shopInfo.vnick) 
	// 	isLogin.value = uni.getStorageSync(global.IS_LOGIN) || false;
	// 	if (!isLogin.value) {
	// 		if (!global.CENTER_LOGIN_PAGE) {
	// 			global.CENTER_LOGIN_PAGE = true; //进入登录页面
	// 			isLoginflag.value = true
	// 			mnavTo(`/pages/login/login`)
	// 		} else {
	// 			isLoginflag.value = false
	// 		}
	// 	}
	// 	if (shopStore.shopInfo.vnick && isLogin.value) {
	// 		storeInfo.value.open()
	// 		if (userStore.getAdresGps.hasGps) {
	// 			getCarLists(userStore.getAdresGps.longitude, userStore.getAdresGps.latitude);
	// 			return
	// 		}
	// 		getLocationData()
	// 		// uni.getLocation({
	// 		// 	//获取当前的位置坐标
	// 		// 	type: 'gcj02', //默认为 wgs84 返回 gps 坐标，gcj02 返回国测局坐标，可用于 uni.openLocation 的坐标
	// 		// 	success: function (res) {
	// 		// 		console.log('当前位置的经度：' + res.longitude);
	// 		// 		console.log('当前位置的纬度：' + res.latitude);
	// 		// 		longitude.value = res.longitude;
	// 		// 		latitude.value = res.latitude;
	// 		// 		getCarLists(res.longitude, res.latitude)
	// 		// 	},
	// 		// 	fail: function (err) {
	// 		// 		console.log('定位失败', err);
	// 		// 	}
	// 		// });
	// 	}
	// }
	// const getLocationData = () => {
	// 	uni.getLocation({
	// 		//获取当前的位置坐标
	// 		type: 'gcj02', //默认为 wgs84 返回 gps 坐标，gcj02 返回国测局坐标，可用于 uni.openLocation 的坐标
	// 		success: function (res) {
	// 			console.log('当前位置的经度：' + res.longitude);
	// 			console.log('当前位置的纬度：' + res.latitude);
	// 			longitude.value = res.longitude;
	// 			latitude.value = res.latitude;
	// 			getCarLists(res.longitude, res.latitude)
	// 		},
	// 		fail: function (err) {
	// 			console.log('定位失败', err);
	// 		}
	// 	});
	// }
	// //门店位置列表
	// const getCarLists = async (longitude : any, latitude : any) => {
	// 	const paramData = {
	// 		longitude: longitude || 113.06463,
	// 		latitude: latitude || 28.208399,
	// 		vtype_two_category: 0,
	// 		vtype: '835',
	// 		sellShopId: shopStore.curSellerMemberId,
	// 		vIsFirstShop: '猪会飞',
	// 		sku: [],
	// 		curPage: 1,
	// 		pageSize: 200
	// 	};
	// 	await fetchStoreList(paramData, getStoreList);
	// };
	// const fetchStoreList = async (paramData : any, apiFunction : any) => {
	// 	try {
	// 		let res = await apiFunction(paramData);
	// 		if (!res.result) throw new Error('获取门店失败!');
	// 		let addressD = processStoreData(res.object, state.latitude);
	// 		// addressStore.value = Object.values(res.object)
	// 		addressStore.value = toRaw(addressD[0])
	// 		// console.log('addressStore.value---------------------------------', toRaw(addressStore.value[0].attentionGoodsId))  
	// 		console.log('addressStorexxxxxxxxxxxxx.value---------------------------------', toRaw(addressD[0]))

	// 	} catch (e) {
	// 		mapi.msg('获取门店失败!');
	// 	}
	// };
	// const processStoreData = (data : any, latitude : any) => {
	// 	let array = [];
	// 	for (let key in data) {
	// 		let dist = latitude ? key.split('.')[0] : '';
	// 		data[key]['distanceUnit'] = dist.length > 3 ? 'km' : 'm';
	// 		dist = dist.length > 3 ? (Number(dist) / 1000).toFixed(2) : dist;
	// 		data[key]['distance'] = dist;
	// 		array.push(data[key]);
	// 	}
	// 	return array;
	// };
	// const processStoreData = (data:any, latitude:any) => {
	//   let array = [];
	//   for (let key in data) {
	//     let dist = latitude ? key.split('.')[0] : '';
	//     data[key]['distanceUnit'] = dist.length > 3 ? 'km' : 'm';
	//     dist = dist.length > 3 ? (Number(dist) / 1000).toFixed(2) : dist;
	//     data[key]['distance'] = dist;
	//     array.push(data[key]);
	//   }
	//   return array;
	// };
	//
	const carAnimationBegin = () => {
		console.log('carAnimationBegin+')
		isActBox.value = true
		caranimation.value.width("730rpx").left(0).step()
		animationData.value = caranimation.value.export()
		// ---------------动画分割线
		caranimationx.value.rotate(0).step()
		animationDatax.value = caranimationx.value.export()

		//---------------------动画分割线
		caranimationL.value.opacity(0).step()
		animationDataL.value = caranimationL.value.export()
	}
	const carAnimationEnd = () => {
		console.log('carAnimationEnd+')
		isActBox.value = false
		caranimation.value.width("550rpx").left("170rpx").step()
		animationData.value = caranimation.value.export()
		// ---------------动画分割线
		caranimationx.value.rotate("50deg").step()
		animationDatax.value = caranimationx.value.export()

		//---------------------动画分割线
		caranimationL.value.opacity(1).step()
		animationDataL.value = caranimationL.value.export()
	}
	const isNullCarAnimBegin = () => {
		// 原10rpx
		animationAllbox.value.opacity(1).bottom((isPhonex.value ? '40rpx' : '40rpx')).step()
		animationAllboxDataf.value = animationAllbox.value.export()
	}
	const isNullCarAnimEnd = () => {
		// 原-100
		animationAllbox.value.opacity(0).bottom('-100rpx').step()
		animationAllboxDataf.value = animationAllbox.value.export()
	}

	const lefAnimationChange = (height : any) => {
		animationLef.value.height(`${height}px`).step()
		animationDataLef.value = animationLef.value.export()
	}
	// const showHib = () => {
	// 	// habitRef.value.openDialog()
	// 	showPop('habitRef')
	// }
	// const choseTase = (item : any) => {
	// 	nowHobit.value = item.ties
	// 	uni.setStorageSync("hib", { hibName: item.ties })
	// 	let storeSy = uni.getStorageSync("checkedDoor")
	// 	if (!storeSy) {
	// 		setTimeout(() => {
	// 			showPop("checkedDoorRef")
	// 		}, 200)
	// 	}
	// }
	// const storeChecked = (item : any) => {
	// 	uni.setStorageSync("checkedDoor", true)
	// 	if (item.nmember_id != shopStore.shopInfo.nmember_id) {
	// 		loadData('onshow')
	// 	}
	// 	if (coupLength.value > 0) {
	// 		showPop('getCoupsRef')
	// 	}
	// 	// getGoodsDet()
	// 	// nowPlan.value.storeName = item.storeName
	// 	// nowPlan.value.distance = item.distance
	// 	// uni.setStorageSync("store", { stores: item })
	// }
	// const submitPay = (payBy : any) => {
	// 	splModel.value.close()
	// 	isSpo.value = true
	// 	isSpoPay.value = payBy
	// 	isShowBill(payBy)

	// }
	// const isShowBill = (payBy : any) => {
	// 	if (billCheck.value) {
	// 		// showPop('billRef')
	// 		billRef.value.open(payBy)
	// 	} else {
	// 		if (payBy == '1') {
	// 			mnavTo('/pages/others/splicingOrders/splicingOrders?addItem=0')
	// 			return
	// 		}
	// 		// mnavTo('/pages/others/paymentByself/paymentByself?payType='+payBy)
	// 	}
	// }
	// const compareTime = (timeResult : any, preDeliverTime : any, readyMealTime : any) => {
	// 	let currentTime = new Date();
	// 	let totalTimeToSubtract = parseInt(preDeliverTime) + parseInt(readyMealTime);
	// 	currentTime.setMinutes(currentTime.getMinutes() - totalTimeToSubtract);
	// 	let [timeResultHour, timeResultMinute] = timeResult.split(':').map(Number);
	// 	let timeResultDate = new Date();
	// 	timeResultDate.setHours(timeResultHour);
	// 	timeResultDate.setMinutes(timeResultMinute);
	// 	timeResultDate.setSeconds(0);
	// 	return currentTime <= timeResultDate;
	// }
	const toJs = async () => {
		// let resultTime=compareTime(shopStore.shutTimes,shopStore.mealTime.preDeliverTime,shopStore.mealTime.readyMealTime)
		// if(resultTime&&cartStore.curOrderType.type != 'SUBSCRIBE'){
		// 	return
		// }
		if (totalAmount.value <= 0) {
			return
		}
		if (!submitData.value.stapleFood) {
			showPop("mianMenuRef")
			return
		}
		if (isSpo.value) {
			//如果当前属于拼单状态并且支付方式为'我一起付款'
			if (isSpoPay.value == '1') {
				mnavTo('/pages/others/splicingOrders/splicingOrders?addItem=1')
			} else {
				mnavTo('/pages/order/creatOrder/creatOrder?spo=1')
			}
			return
		}
		shopStore.setChangeCoups([])
		uni.vibrateShort();
		uni.navigateTo({
			url: '/pages/order/creatOrder/creatOrder'
		})
	}
	const backActs = async (flags : any) => {
		if (!flags) {
			hidePop('mianMenuRef')
			uni.navigateTo({
				url: '/pages/order/creatOrder/creatOrder'
			})
			return
		}
		hidePop('mianMenuRef')
		let obj = { id: '10', source: 'searchMenu', action: 'findesMainFood' }
		uni.setStorageSync('menuact', obj)
		setTimeout(()=>{
			uni.switchTab({
			  url: "/pages/index/menu/menu"
			})
		},10)		
		// if (tabCur.value == 2) {
		// 	tabCur.value = 0
		// 	uni.removeStorageSync('menuact')
		// 	await getGoodsDet()
		// }
		// //优先找当前分类下是否有主食，如果vip区没有则跳转到普餐区找
		// // isParent:判断主食分类是父级还是子级
		// let result = await findMainFood(list.value);
		// if (!result && vipCur.value == 1) {
		// 	vipCur.value = 0;
		// 	await getGoodsDet();
		// 	result = await findMainFood(list.value);
		// }

		// if (result && result.isParent) {
		// 	// let propsItem = shopist.value.find((item : any) => item.parentid == list.value[result.values].id) || '';
		// 	tabSelecLeft('', result.values, list.value[result.values], '', '', '');
		// } else {
		// 	let e = {
		// 		currentTarget: {
		// 			dataset: {
		// 				id: result.values
		// 			}
		// 		}
		// 	};
		// 	tabSelecLeft("", result.parentIndex, "", "", "")
		// 	changescIndex(e, "", "")
		// }
	}
	// const findMainFood = async (list : any[]) => {
	// 	for (let i = 0; i < list.length; i++) {
	// 		const parent = list[i];
	// 		if (parent.name && parent.name.includes("主食")) {
	// 			return { values: i, isParent: true };
	// 		} else if (parent.children) {
	// 			const child = parent.children.find((child : any) => child.vname && child.vname.includes("主食"));
	// 			if (child) {
	// 				return {
	// 					values: child.nsell_category_id,
	// 					isParent: false,
	// 					parentIndex: i
	// 				};
	// 			}
	// 		}
	// 	}
	// 	return undefined;
	// }
	// const changeVip = (index : any) => {
	// 	closeDrag()
	// 	stabCurs.value = 0
	// 	stabCur.value = 0
	// 	// shopist.value=[]
	// 	vipCur.value = index
	// 	if (index == '1' && !userVip.value) {
	// 		vipTipShow.value = true
	// 		// setTimeout(()=>{
	// 		// 	vipTipShow.value=false
	// 		// },2000)

	// 	}
	// 	if (index == '0') {
	// 		vipTipShow.value = false
	// 	}
	// 	getGoodsDet()
	// }
	const addCar = async (e : any, item : any) => {
		closeDrag()
		// let res = await getCartList()
		const result = containsSKU(submitData.value.list, item.sku);
		if (!result) {
			addShop(e, item)
			return
		}
		numsActions(e, item, "addNum")
	}
	const containsSKU = (data : any, targetSKU : any) => {
		if (!data) {
			return
		}
		return data.some((item : any) => item.sku == targetSKU
			// good.goodsDetails.some((detail : any) => detail.sku === targetSKU)
		);
	}
	const getsku = (arr) => {
		const randomIndex = Math.floor(Math.random() * arr.length);
		return arr[randomIndex];
	}
	const addShop = async (e : any, item : any, source : any = '') => {
		showLoading()
		try {
			let res : any = null;
			const baseParams = {
				sku: item.sku,
				nums: source == 'orderDetials' ? item.nums : 1,
				type: item.shopType == '0' ? 'sp' : 'tc',//1单套 2多套
				defaultServiceType: "795",
				labelIds: item.labelIds || []
			};
			const params : any = item.isVip == '1' ? { ...baseParams, special_id: item.specialId } : { ...baseParams };
			if (cartStore.curOrderType && cartStore.curOrderType.type) {
				params.patten = cartStore.curOrderType.type;
				params.subsTime = cartStore.curOrderType.time.dateString
			}
			if( item.isVip == '1'){
				shopStore.setChangeCoups([])
			}
			res = item.isVip == '1' ? await addVipGood(params) : await shopcartAdd(params);
			if (orderDetialParams.value && orderDetialParams.value.shopParams) {
				orderDetialParams.value.shopParams.shift()
			}
			if (res && res.result) {
				if (e && e != '') {
					ballRef.value.action(e.events, env.imgBaseUrl + item.vmaster_product_image_id)
				}
				if (source != 'orderDetials' || orderDetialParams.value && orderDetialParams.value.shopParams?.length == 0) {
					getShopNums(source)
					orderDetialParams.value = {}
				}
			} else {
				if (source != 'orderDetials') {
					mapi.msg(res.shortMessage || "加入购物车失败!", res.code)
					item.num = item.num - 1
				}
				if (source == 'orderDetials' && orderDetialParams.value && orderDetialParams.value.shopParams?.length == 0) {
					getShopNums(source)
					orderDetialParams.value = {}
				}
				hideLoading()
			}

			if (source == 'orderDetials' && orderDetialParams.value && orderDetialParams.value.shopParams?.length > 0) {
				addShop('', orderDetialParams.value.shopParams[0], 'orderDetials')
			}
		} catch (e) {
			hideLoading()
			console.error(e)
		}

	}
	const delCar = async (e : any, item : any) => {
		setTimeout(() => {
			if (item.num == '0') {
				delShopCar(item)
				return
			}
			numsActions(e, item, "delNum")
		})
	}
	const delShopCar = async (item : any) => {
		let res = await shopcartDel({ sku: item.sku })
		if (res.result) {
			getShopNums()
		}

	}
	const numsActions = async (e : any, item : any, types : any) => {
		showLoading()
		try {
			let params : any = {
				sku: item.sku,
				act: types,
				nums: 1
			}
			if (cartStore.curOrderType && cartStore.curOrderType.type) {
				params.patten = cartStore.curOrderType.type;
				params.subsTime = cartStore.curOrderType.time.dateString
			}
			let res = await editCart(params)
			// hideLoading()
			if (res.result) {
				getShopNums()
				// syncActions()
				if (types == 'addNum' && e && e != '') {
					ballRef.value.action(e.events, env.imgBaseUrl + item.vmaster_product_image_id)
				} else {
					// mapi.msg("操作成功!")
				}
			} else {
				mapi.msg(res.shortMessage || '网络繁忙，请稍后再试!')
				hideLoading()
				item.num = item.num - 1
			}
		} catch (e) {
			hideLoading()
			mapi.msg('网络繁忙，请稍后再试!')
		}
	}
	const submitData = ref<any>({});
	//购物车
	const changeTotal = (res : any) => {
		submitData.value = res;
		totalAmount.value = res.nums;
		console.log('changeTotal', res)
		if (totalAmount.value > 0) {
			isNullCarAnimBegin()
		}

		// totalAmount.value = total
		// totalAmount.value == 0&&hidePop('carListRef')
		// if (totalAmount.value == 0) {
		// 	for (let i in shopist.value) {
		// 		shopist.value[i].num = '0'
		// 	}
		// 	hidePop('carListRef')
		// }
	}
	const stopPrevent = () => { }
	// const sendOrder = (pType : any) => {
	// 	if (pType == '1') {
	// 		mnavTo('/pages/others/splicingOrders/splicingOrders?payType=' + pType)
	// 		return
	// 	}
	// 	// mnavTo('/pages/others/paymentByself/paymentByself?payType='+pType)
	// }
	// const canelSop = () => {
	// 	showPop('canelSpoRef')
	// }
	// const spoCanel = () => {
	// 	uni.removeStorageSync('isSpo')
	// 	tabCur.value = 0
	// 	isSpo.value = false
	// }
	const maskCloseDeltime = () => {
		if (cartStore.curOrderType.type == '') {
			cartStore.setCurOrderTypeString('')
			cartStore.setCurOrderDateString('')
			tablist.value[1].name = '预定'
			nowPickvalue.value = ""
			tabCur.value = 0;
			getGoodsDet();
		}
	}
	const dataCallback = (e : any) => {
		nowPickvalue.value = e.origTimes
		tablist.value[1].name = e.timezh
		// cartStore.setCurOrderDateString(e.origTimes)
		// cartStore.setCurOrderTypeString('SUBSCRIBE')
		// tabsRef.value.init()
	}
	//选择小时
	const timeCallback = (e : any) => {
		hidePop('reserve')
		if (nowPickvalue.value == '') {
			nowPickvalue.value = e.origTimes
			tablist.value[1].name = e.timezh
		}
		cartStore.setCurOrderTypeString('SUBSCRIBE')
		getGoodsDet()
	}
	const initCurOrderTime = () => {
		let storeOrder = cartStore.curOrderType
		if (storeOrder.type != '') {
			let storeOrderName = cartStore.curOrderType.time.timezh
			tabCur.value = 1
			tablist.value[1].name = storeOrderName
			nowPickvalue.value = cartStore.curOrderType.time.dateString
		} else {
			tablist.value[1].name = "预定"
			// tabsRef.value.init()
		}
	}
	const initOrderOnemore = () => {
		if (orderDetialParams.value && orderDetialParams.value.shopParams?.length > 0&&shopStore.orderAgain) {
			shopStore.setHasShut(true);
			shopStore.setShutStates('beyonDdistance');
			addCarEvents()
		}
	}
	// const yudActions = () => {
	// 	tabCur.value = 1
	// 	// tabsRef.value.init()
	// 	showPop('reserve')
	// }
	// const toGetCups = (item : any) => {
	// 	if (coupLength.value <= 0) {
	// 		return
	// 	}
	// 	showPop('getCoupsRef')
	// 	// getCoupsRef.value?.open(item)
	// }
	// const getNumShow = (item: any) => {
	// 	//num-box显示
	//     if (userVip) {
	//         if (cartStore.curOrderType.type !== '') {
	//             return true;
	//         } else if (item.issellOut == '1' && !shopStore.hasShut && cartStore.curOrderType.type == '' && shopStore.shutStates == 'opens') {
	//             return true;
	//         }
	//     } else {
	//         if (cartStore.curOrderType.type !== '') {
	//             if (vipCur.value == 0) {
	//                 return true;
	//             } else if (vipCur.value == 1) {
	//                 return false;
	//             }
	//         } else if (item.issellOut == '1' && !shopStore.hasShut && cartStore.curOrderType.type == '' && shopStore.shutStates == 'opens' && vipCur.value == 0) {
	//             return true;
	//         }
	//     }
	//     return false;
	// };
	const getAddnums = (item : any) => {
		if (!item.specList) {
			return false
		}
		let sellOuts = item.specList && item.specList.every((it : any) => Number(it.num ?? 0) >= Number(it.nsell_nums))
		if (userVip) {
			if (cartStore.curOrderType.type !== '') {
				if (shopStore.shutStates != 'opens') {
					return false;
				}
				return true;
			} else if (!sellOuts && !shopStore.hasShut && cartStore.curOrderType.type == '' && shopStore.shutStates == 'opens') {
				return true
			}
		} else {
			if (cartStore.curOrderType.type !== '') {
				if (shopStore.shutStates != 'opens') {
					return false;
				} else {
					if (vipCur.value == 0) {
						return true;
					} else if (vipCur.value == 1) {
						return false;
					}
				}
			} else if (!sellOuts && !shopStore.hasShut && cartStore.curOrderType.type == '' && shopStore.shutStates == 'opens' && vipCur.value == 0) {
				return true;
			}
		}
		// return false
	}
	const getMaxNum = (item : any) => {
		// cartStore.curOrderType.type==''?item.nsell_nums:9999
		if (cartStore.curOrderType.type == 'SUBSCRIBE') {
			if (shopStore.hasShut && shopStore.shutStates != 'opens') {
				return 0
			} else {
				return 9999
			}
		} else {
			return item.nsell_nums
		}
	}
	// const getSalesPromotion = async () => {
	// 	let cashCoupon = await queryMenuPromotion({ sellerMemberd: shopStore.curSellerMemberId })
	// 	let cashCouponFinal = await queryMenuPromotionList({ pageSize: 20, curPage: 1, sellerMemberIds: shopStore.curSellerMemberId })
	// 	let cashCouponResult = cashCoupon.object || []
	// 	coupsList.value = []
	// 	for (let i in cashCouponResult) {
	// 		coupsList.value.push({
	// 			content: cashCouponResult[i],
	// 			coupon_type_two: "970",
	// 			allowReceive: false,
	// 		})
	// 	}

	// 	let cashFinalResult = cashCouponFinal.object || []
	// 	coupLength.value = cashFinalResult.length
	// 	for (let its of cashFinalResult) {
	// 		if (its.status != '96') {
	// 			coupsList.value.push({
	// 				...its,
	// 				content: its.coupon_type_two == '970' ? parseRate(its.par_value) : its.par_value,
	// 				allowReceive: true
	// 			})
	// 		}
	// 	}
	// }
	// const hasGetCups = async () => {
	// 	getSalesPromotion()
	// 	await carListRef.value.initCar('');
	// }
	// const parseRate = (value : any) => {
	// 	if (!isNaN(value)) {
	// 		let num = value * 100;
	// 		num = num % 10 === 0 ? num / 10 : num
	// 		return num
	// 	} else {
	// 		return 0
	// 	}
	// }
	// const changeStores = async () => {
	// 	hidePop('orderAgainRef')
	// 	mnavTo('/pages/others/shopList/shopList?source=menu&scope=' + nowSwitch.value)
	// 	// if (orderDetialParams.value && orderDetialParams.value.shopParams?.length > 0) {
	// 	// 	await getSellerConfig()
	// 	// 	orderDetialParams.value = {}
	// 	// }
	// 	// shopStore.setOrderAgain(false)
	// 	uni.removeStorageSync('menuact')
	// }
	const isNullCa = () => {
		//先清除弹窗
		if (curPop.value == 'carListRef') {
			curPop.value = ''
		}
		isNullCarAnimEnd()
		carAnimationEnd()
		showMj.value = false
	}
	// const recTotalEnergy = computed(()=>{
	// 	let t = 0,r =0,s =0;
	// 	t = getRecom('protein') + getRecom('fat') + getRecom('edible_oil') + getRecom('salt');

	// 	return r
	// })

	// const getNuters = async () => {
	// 	let resultNutrients = await queryNutrients({})
	// 	let nresNutrients = resultNutrients.object || []
	// 	queryNutrientsList.value = nresNutrients.map((item : any) => ({
	// 		...item,
	// 		columns_name: item.columns_name.toLowerCase()
	// 	}));
	// }
	// const getRecom = (nres : any) => {
	// 	const matchedItem = queryNutrientsList.value.find(item => item.columns_name == nres);
	// 	if (matchedItem) {
	// 		const { max_value } = matchedItem;
	// 		return (max_value || 0)
	// 	}
	// 	return 0
	// }
	const addCarEvents = async (source : any = '') => {
		if (!source) {
			let distanInfo = await orderAgainRef.value.getDistance({ lo: orderDetialParams.value.localInfo.lo, la: orderDetialParams.value.localInfo.la })
			console.log(distanInfo, "distanInfo")
			if (!distanInfo.allowSent) {
				showPop('orderAgainRef', orderDetialParams.value.sellMemberIds)
				setTimeout(() => {
					shopStore.setHasShut(true);
					shopStore.setShutStates('beyonDdistance');
				}, 20)
				return
			} else {
				hidePop('orderAgainRef')
				await getSellerConfig()
				addCarsCations()
				shopStore.setOrderAgain(false)
				return
			}
		}
		if (orderDetialParams.value && orderDetialParams.value.patten) {
			showPop('reserve')
			return
		}
		addCarsCations()
	}
	const addCarsCations = () => {
		let item = orderDetialParams.value.shopParams[0]
		addShop('', item, 'orderDetials')
		hideLoading()
	}
	const getNameTags = (namePar : any) => {
		let result = convertToEnglishSymbols(namePar)
		return result ? result.split(",") : []
	}
	const conName = (namePar : any) => {
		let result = convertToEnglishSymbols(namePar)
		return result
	}
	const conNameReplace = (namePar : any) => {
		let result = convertToEnglishSymbols(namePar)
		let newStr = result.replace(/,/g, ' ');
		return newStr
	}
	const convertToEnglishSymbols = (str : any) => {
		//将所有中文符号转化为英文符号
		return str
			.replace(/，/g, ',')
		// .replace(/。/g, '.')
		// .replace(/！/g, '!')
		// .replace(/？/g, '?')
		// .replace(/：/g, ':')
		// .replace(/；/g, ';')
		// .replace(/（/g, '(')
		// .replace(/）/g, ')') 
		// .replace(/【/g, '[')  
		// .replace(/】/g, ']'); 
	}
	// const togetPops = () => {
	// 	showPop('getCoupsRef', 'menu')
	// }
	// const changeSt = async () => {
	// 	shopStore.setHasShut(false);
	// 	shopStore.setShutStates('opens');
	// 	// await getSellerConfig()
	// 	hidePop('orderAgainRef')
	// 	addCarEvents('emitChange')
	// }
	// const getSwipers = async () => {
	// 	try {
	// 		let res = await getTemplate({ vscope: shopStore.curSellerMemberId, vtype: "831", vstatus: "829" })
	// 		if (!res.result) {
	// 			return
	// 		}
	// 		topSwiperList.value = [];
	// 		let redEnv = res.object && res.object.positionList && res.object.positionList.length > 0 ? res.object.positionList.find((item : any) => item.vbus_code == 'B803') : [];
	// 		let topSwiper = res.object && res.object.positionList && res.object.positionList.length > 0 ? res.object.positionList.find((item : any) => item.vbus_code == 'B900') : [];

	// 		let nshare = res.object && res.object.positionList && res.object.positionList.length > 0 ? res.object.positionList.find((item : any) => item.vbus_code == 'B801') : [];
	// 		if (redEnv) {
	// 			redEnvImg.value = redEnv.positionContentList?.length > 0 && redEnv.positionContentList[0].vimage_url ? imgBaseUrl.value + redEnv.positionContentList[0].vimage_url : env.FileUrl + 'food/ico/images/dc_coup01.png'
	// 		}
	// 		if (topSwiper) {
	// 			topSwiperList.value = topSwiper.positionContentList || []
	// 		}
	// 		if (nshare) {
	// 			const simg = nshare.positionContentList?.length > 0 && nshare.positionContentList[0].vimage_url ? imgBaseUrl.value + nshare.positionContentList[0].vimage_url : '';
	// 			uni.setStorageSync('shareImg', simg)
	// 		}
	// 		const scont = res.object && res.object.vshare_title ? res.object.vshare_title : '';
	// 		uni.setStorageSync('shareTitles', scont)
	// 	} catch (e) {
	// 		console.error(e)
	// 	}


	// }
	const goSobotUrl = (url : any, sysnum : any) => {
		console.log('url', url);
		if (!url) return;
		if (url.substring(0, 5) == 'https' || url.substring(0, 3) == 'www') {
			mnavTo('/pages/user/sobot_common/sobot_common?urlPath=' + encodeURIComponent(JSON.stringify(url)) + '&paramData=' + encodeURIComponent(JSON.stringify({ sysnum: sysnum })))
		} else {
			mnavTo(url)
		}
	}
	// const toSearchs = () => {
	// 	mnavTo('/pages/order/searchMenu/searchMenu')
	// }
	const doClear=()=>{
		searchText.value=''
		doFocus()
	}
	const doFocus=()=>{
		if(inputFocus.value){
			inputFocus.value=false
		}
		setTimeout(()=>{
			inputFocus.value=true
		},1)
		
	
	}
	const doSearchs = async () => {
		if(searchText.value==''){
			return
		}
		// showLoading()
		try {
			let res = await getSearch({ checkTime:cartStore.curOrderType.type?cartStore.curOrderType.time.dateString:'', serviceType: shopStore.costPlan, sellMemberId: shopStore.curSellerMemberId,q:searchText.value });
			loaded.value = true
			searchList.value = []
			let nres = res.object || [];
			if (!res.result || !res.object || nres.length <= 0) {
				hideLoading();
				return
			}
			let resulFinal = {
				vname: "",
				sgoodsList: [],
				id: 0,
			}
			for (let i of res.object) {
				resulFinal.sgoodsList.push({
					...i,
					shopType: i.vtwo_type == '813' ? '1' : i.vtwo_type == '814' ? '2' : '0',//813单套 814多套
					isVip: i.vipFlag == '5' ? '1' : '0',
					shopTop: i.hotCake,
					specsOnly: (i.specList && i.specList.length > 1) || i.spickLabelFlag ? '1' : '0',
					num: 0,
					tags: i.goodsLabels ? i.goodsLabels.split(",") : [],
					id: i.nsell_category_id,
					totalReduce: i.activity ? (shopStore.costPlan == '1130' ? i.site_sell_price : i.out_sell_price) : i.old_price,
					// price: i.activity ? i.activity_price : (nowSwitch.value == '1130' ? i.site_sell_price : i.out_sell_price),
					limited: i.nsell_nums || 0,
					issellOut: i.nsell_nums && i.nsell_nums > 0 ? '1' : '0',
					cupText: getCupText(i)
				})
			}
	
			searchList.value.push(resulFinal)
			checkLogin() && getShopNums();
		} catch (e) {
			hideLoading();
		}
	}
</script>

<style lang="scss">
	.tels {
		color: #53A87F;
		margin-left: 20rpx;
	}

	.order_title {
		width: 100vw;
		min-height: 270rpx;
		background: linear-gradient(187deg, #09EC8D -58.04%, #FFF 54.43%);

		.tabpanl-box {
			display: flex;
			flex-direction: row;
			justify-content: flex-start;
			align-items: center;
			padding: 0 20rpx 0 20rpx;
			margin-left: -20rpx;

			.tabpanl {
				.text-underline {
					width: 80%;
					height: 4rpx;
					background-color: #53A87F;
					margin: auto;
				}
			}
		}

		.address-box {
			width: 100vw;
			height: 58rpx;
			margin-top: 10rpx;
			padding: 0px 20rpx 0px 30rpx;
			display: flex;
			justify-content: space-between;
			// margin-top: 40rpx;

			.address {
				max-width: 394rpx;
				height: 100%;
				display: flex;
				justify-content: space-between;
				align-items: center;

				.address_text {
					max-width: 378rpx;
					color: #000;
					font-family: "Microsoft YaHei UI";
					font-size: 28rpx;
					font-style: normal;
					font-weight: 400;
					white-space: nowrap;
					overflow: hidden;
					text-overflow: ellipsis;
				}

				.addres_icon {
					width: 8rpx;
				}
			}

			.switchs {
				// width: 190rpx;
				width: auto;
				height: 100%;
				border-radius: 56rpx;
				background: rgba(83, 168, 127, 0.10);
				display: flex;
				justify-content: center;
				align-items: center;

				.switchsItem {
					width: 92rpx;
					height: 50rpx;
					line-height: 50rpx;
					padding: 0rpx 20rpx 0rpx 20rpx;
					flex: 1;
					border-radius: 56rpx;
					white-space: nowrap;
					color: #999;
					font-family: "Microsoft YaHei UI";
					font-size: 28rpx;
					font-style: normal;
					font-weight: 400;
				}

				.switchActive {
					color: #fff;
					background: #53A87F;
				}
			}
		}

		.distance {
			color: #333;
			font-family: "Microsoft YaHei UI";
			font-size: 28rpx;
			font-style: normal;
			font-weight: 400;
			line-height: normal;
			padding: 0rpx 20rpx 0rpx 30rpx;
			margin-top: 20rpx;
		}

		.distance_el {
			color: #333;
			font-family: "Microsoft YaHei UI";
			font-size: 28rpx;
			font-style: normal;
			font-weight: 400;
			line-height: normal;
			padding: 10rpx 20rpx 0rpx 30rpx;
			margin-top: 10rpx;

			.distance_el_st {
				display: inline-block;
				max-width: 190rpx;
				overflow: hidden;
				white-space: nowrap;
				text-overflow: ellipsis;
			}
		}

		.storeInfo {
			display: flex;
			justify-content: space-between;
			color: #999;
			font-family: "Microsoft YaHei UI";
			font-size: 24rpx;
			font-weight: 400;
			margin-top: 15rpx;
			padding: 0rpx 20rpx 0rpx 35rpx;
		}
	}

	.vip_box {
		width: 100%;
		height: 80rpx;
		// margin-top:53rpx;
		display: flex;
		justify-content: space-between;
		background-color: #fff;
		align-items: center;
		padding: 0rpx 20rpx 0rpx 20rpx;

		.vip_change {
			height: 100%;
			width: 520rpx;
			display: flex;
			align-items: center;

			.vip_item {
				margin-left: 35rpx;
			}

			.vipAc {
				color: #333;
				font-family: "Microsoft YaHei UI";
				font-size: 32rpx;
				font-weight: 700;
				letter-spacing: 0.48px;
			}

			.vipUn {
				color: #999;
				font-family: "Microsoft YaHei UI";
				font-size: 28rpx;
				font-weight: 400;
				letter-spacing: 0.48px;
			}
		}

		.tas_type {
			display: flex;
			color: #333;
			font-size: 28rpx;
			margin-top: -5rpx;

			.icss_rig {
				width: 40rpx;
				height: 40rpx;
				border-radius: 50%;
				background: rgba(83, 168, 127, 0.10);
				padding-top: 5rpx;
			}
		}
	}

	.isActive {
		color: #000;
		font-family: "Microsoft YaHei UI";
		font-size: 32rpx;
		font-style: normal;
		font-weight: 700;
	}

	.unActive {
		color: #666;
		font-family: "Microsoft YaHei UI";
		font-size: 32rpx;
		font-style: normal;
		font-weight: 400;
	}

	.scroll_box {
		width: 100%;
		height: calc(100vh - 510rpx);
		margin-top: 2rpx;
		display: flex;
	}


	// --------------------第二版底部结算star------------

	.balance_box {
		width: 722rpx;
		min-height: 140rpx; //158
		position: fixed;
		bottom: -84rpx;
		left: 15rpx;
		z-index: 101;
		display: flex;

		.mj_box {
			width: 722rpx;
			position: fixed;
			bottom: 150rpx;
			left: 15rpx;
			z-index: 0;
			height: 84rpx;
			border-radius: 20rpx;
			background-color: #FFF4E4;
			text-align: center;
			color: #FF9700;
			font-size: 28rpx;
			font-weight: 700;
			padding-top: 10rpx;
		}

		.bottom_balance {
			width: 100%;
			height: 98rpx;
			// box-shadow: 0rpx 0rpx 40rpx 0rpx rgba(0, 0, 0, 0.30);
			position: absolute;
			bottom: 0rpx;
			left: 0rpx;
			display: flex;
			align-items: center;

			.ba_left {
				width: 179rpx;
				height: 100%;
				position: relative;
				overflow: hidden;

				.ba_left_c {
					width: 100%;
					height: 100%;
					transform-origin: left bottom;
					background-color: #53A87F;
					transform: perspective(87rpx) scale(0.87, 0.87) rotateX(-7deg);
					border-radius: 50rpx 10rpx 10rpx 60rpx;
					z-index: 101;
				}

				.ba_left_cc {
					width: 85%;
					height: 100%;
					z-index: 102;
					position: absolute;
					left: 0;
					top: 0;
					padding: 10rpx 10rpx 10rpx 20rpx;
					text-align: center;

					.my_q {
						font-size: 32rpx;
						color: #fff;
						margin-top: 5rpx;
						margin-left: 20rpx;
					}

					.q_toal {
						font-size: 20rpx;
						color: rgba(255, 255, 255, 0.70);
						white-space: nowrap;

						text {
							color: #fff;
							margin-top: 10rpx;
						}
					}
				}
			}

			.ba_right {
				width: 550rpx;
				height: 100%;
				position: absolute;
				left: 170rpx;
				top: 0;
				z-index: 102;

				.ba_r_box {
					width: 100%;
					height: 100%;
					position: relative;

					.ba_right_c {
						width: 100%;
						height: 100%;
						transform-origin: right bottom;
						transform: perspective(87rpx) scale(1, 1.05) rotateX(2.2deg);
						border-radius: 10rpx 60rpx 60rpx 10rpx;
						z-index: 102;

						&.acti {
							border-radius: 50rpx;
						}
					}

					.ba_ri_con {
						display: flex;
						justify-content: space-between;
						position: absolute;
						width: 100%;
						height: 100%;
						top: 0;
						left: 0;
						padding-left: 14rpx;

						.hasCar_l {
							max-width: 400rpx;
							height: 100%;
							display: flex;

							.imagess {
								width: 80rpx;
								height: 80rpx;
								margin-top: 6rpx;
								margin-left: 10rpx;
							}

							.hasCar_l_info {
								max-width: 317rpx;
								height: 100%;
								color: #fff;
								padding: 0rpx 5rpx 0rpx 20rpx;

								.info_pri {
									display: flex;
									white-space: nowrap;

									.yh {
										font-size: 20rpx;
										color: rgba(255, 255, 255, 0.70);
										margin-left: 10rpx;

									}
								}

								.yunf {
									color: #FFF;
									font-family: "Microsoft YaHei UI";
									font-size: 22rpx;
									white-space: nowrap;

								}
							}
						}

						.isNullCar_l {
							width: 330rpx;
							height: 100%;
							padding: 0 10rpx 0rpx 0rpx;
							display: flex;

							.null_tips {
								color: #FFF;
								font-family: "Microsoft YaHei UI";
								font-size: 32rpx;
								font-style: normal;
								padding-left: 60rpx;
							}
						}

						.isNullCar_r {
							width: 132rpx;
							height: 100%;
							line-height: 99rpx;
							text-align: center;
							line-height: 95rpx;
							color: #FFF;
							font-family: "Microsoft YaHei UI";
							font-size: 32rpx;
							font-weight: 400;
						}

						.hasCar_r {
							// height: 102%;
							background-color: #53A87F;
							margin-top: 0rpx;
							border-radius: 0rpx 46rpx 46rpx 0rpx;
							transform: scale(1, 1.015);
						}
					}
				}
			}
		}
	}

	.yunf_outpri {
		color: #FF9307;
	}

	// --------------------第二版底部结算end------------
	.VerticalNav.nav {
		width: 170rpx;
		white-space: initial;
		position: relative;
	}

	.VerticalNav.nav .cu-item {
		width: 100%;
		text-align: center;
		margin: 0;
		border: none;
		min-height: 90rpx;
		position: relative;
		height: auto;
		padding: 0;

		.view-box-chindred {
			color: #666;
			text-align: center;
			font-family: "Microsoft YaHei UI";
			font-size: 28rpx;
			font-style: normal;
			font-weight: 400;
			min-height: 90rpx;
			height: auto;
			background-color: #F5F7F6;
			// border: 1px solid #000;
			margin-top: 20rpx;
		}
	}

	.VerticalNav.nav .cu-item:nth-child(n+2) {
		margin-top: 20rpx;
	}

	.VerticalNav.nav .cu-item.cur {
		background-color: #fff;
		color: #648C6A;
		text-align: center;
		font-family: "Microsoft YaHei UI";
		font-size: 25rpx;
		font-style: normal;
		font-weight: 700;
	}

	.VerticalNav.nav .cu-item.uncur {
		color: #666;
		text-align: center;
		font-family: "Microsoft YaHei UI";
		font-size: 25rpx;
		font-style: normal;
		font-weight: 400;
	}

	.VerticalNav.nav .cu-item.cur::after {
		content: "";
		width: 14upx;
		height: 90rpx;
		position: absolute;
		background-color: currentColor;
		top: 0;
		left: 0rpx;
		bottom: 0;
	}

	.vbmbox {
		transition: height 0.2s ease-out;
		height: 0;
		overflow: hidden;
	}

	.VerticalBox {
		display: flex;
	}

	.VerticalMain {
		background-color: #fff;
		flex: 1;
		padding: 25rpx 0rpx 40rpx 10rpx;
		position: relative;
	}

	.view-box {
		width: 100%;
		height: 100%;
	}

	.view-box image {
		width: 48rpx;
		height: 48rpx;
	}

	.cu-bar {
		width: 100%;
		min-height: 304rpx;
		display: flex;
		align-items: normal;
		border-bottom: 1rpx solid #E4E4E4;
		padding: 15px 5rpx 15rpx 25rpx;
		position: relative;

		&:nth-last-child(1) {
			margin-bottom: 20rpx;
			border:none;
		}

		.immsb {
			position: absolute;
			left: 15rpx;
			top: 5rpx;
			z-index: 8;
			width: 52rpx;
			height: 58rpx
		}

		.showImgs {
			width: 226rpx;
			height: 226rpx;
			position: relative;
			overflow: hidden;

			.spcPrice {
				position: absolute;
				left: 0;
				bottom: 0;
				border-radius: 0px 26rpx;
				background: linear-gradient(90deg, #FF7A00 -10.89%, #FCDCBF 138.82%);
				width: 94rpx;
				height: 44rpx;
				text-align: center;
				line-height: 44rpx;

				.spcPrice_icons {
					font-size: 22rpx;
					color: #fff;
				}
			}

			.sellOut {
				position: absolute;
				left: 0;
				bottom: 0;
				width: 100%;
				height: 40rpx;
				border-radius: 0px 0px 26rpx 26rpx;
				background: rgba(0, 0, 0, 0.50);
				color: #fff;
				text-align: center;
				line-height: 40rpx;
				letter-spacing: 5rpx;
				color: #FFF;
				font-size: 28rpx;
				font-style: normal;
				font-weight: 400;
				z-index: 9;
			}

			.imms {
				width: 100%;
				height: 100%;
				border-radius: 26rpx;
			}

			.hy {
				position: absolute;
				right: 0;
				bottom: 0rpx;
				z-index: 8;
				width: 36rpx;
				height: 36rpx;
				line-height: 37rpx;
				background-color: #F5A623;
				border-radius: 10rpx 0rpx 20rpx 0rpx;

				.hs_s {
					color: #fff;
					font-size: 24rpx;
					display: block;
					padding-left: 6rpx;
					padding-top: 4rpx;
				}
			}
		}

		.shopinfo {
			width: 292rpx;
			height: 100%;
			position: relative;

			.juanhouStyle {
				.juanhouStylefsizi {
					color: #FC4C40;
					font-family: "Microsoft YaHei UI";
					font-size: 10px;
					font-weight: 400;
					line-height: normal;
					margin-top: 10rpx;
					margin-right: 4rpx;
				}

				.juanhoupic {
					color: #FC4C40;
					font-family: "Microsoft YaHei UI";
					font-size: 36rpx;
					font-style: normal;
					font-weight: 700;
					line-height: normal;
				}

				.couponIssuance {
					width: 56rpx;
					height: 32rpx;
					flex-shrink: 0;
					border-radius: 4px;
					border: 0.5px solid #53A87F;
					background: rgba(83, 168, 127, 0.10);
					margin-left: 10rpx;
					// position: absolute;
					// bottom: 0rpx;
					// left:90rpx;
					color: #53A87F;
					font-size: 20rpx;
					font-weight: 400;
					line-height: 32rpx;
					/* 160% */
					display: flex;
					justify-content: center;
					align-items: center;
				}
			}

			.shopinfo-shopname {
				color: #000;
				font-family: "Microsoft YaHei UI";
				font-size: 32rpx;
				font-style: normal;
				font-weight: 700;
			}

			.showinfo-tag {
				display: flex;
				flex-wrap: wrap;
				justify-content: flex-start;
				min-height: 32rpx;

				.kcal {
					border-radius: 8rpx;
					border: 0.5rpx solid #53A87F;
					color: #53A87F;
					font-size: 22rpx;
					font-style: normal;
					font-weight: 700;
					padding: 5rpx 10rpx 5rpx 10rpx;
					margin-top: 15rpx;
					margin-right: 10rpx;
					display: flex;
					justify-content: center;
					align-items: center;
				}
			}

			.shop-hasDishes {
				color: #333;
				font-family: "Microsoft YaHei UI";
				font-size: 24rpx;
				font-style: normal;
				font-weight: 400;
				margin-top: 15rpx;
				margin-bottom: 18rpx;
			}

			.show-price {
				width: 100%;
				height: 60rpx;
				margin-top: 15rpx;
				display: flex;
				justify-content: space-between;
				padding-right: 10rpx;
				position: relative;

				.price {
					align-items: normal;
					color: #FC4C40;
					font-size: 36rpx;
					font-style: normal;
					font-weight: 700;
					position: relative;
					padding-top: 4rpx;

					.totalReduce {
						color: #999;
						font-size: 24rpx;
						font-style: normal;
						font-weight: 400;
						text-decoration: line-through;
						margin-left: 10rpx;
					}
					.totalReduceTc{
						color: #999;
						font-size: 24rpx;
						font-style: normal;
						font-weight: 400;
						margin-left: 10rpx;
					}

					.limited {
						color: #999;
						font-size: 24rpx;
						font-style: normal;
						font-weight: 400;
					}
				}

				.priceBtnAv {
					min-width: 112rpx;
					height: 52rpx;
					border-radius: 26.4rpx;
					background: #53A87F;
					line-height: 52rpx;
					color: #fff;
					margin-top: 4rpx;
					display: flex;
					justify-content: center;
					align-items: center;
				}

				.priceBtnAvs {
					min-width: 112rpx;
					height: 52rpx;
					border-radius: 26.4rpx;
					background: #E7EAE8;
					line-height: 52rpx;
					color: #666;
					margin-top: 4rpx;
					display: flex;
					justify-content: center;
					align-items: center;
				}

				.priceBtnAU {
					min-width: 112rpx;
					height: 52rpx;
					border-radius: 26.4rpx;
					background: #53A87F;
					line-height: 52rpx;
					color: #fff;
					margin-top: 4rpx;
					display: flex;
					justify-content: center;
					align-items: center;
				}

				.prUniss {
					width: 45rpx;
					height: 45rpx;
					border-radius: 50%;
					background-color: #53A87F;
				}

				.prUnis {
					width: 45rpx;
					height: 45rpx;
					border-radius: 50%;
					background-color: #E7EAE8;
				}
			}

			.evaluate {
				width: max-content;
				height: 40rpx;
				border-radius: 10rpx;
				background: rgba(235, 239, 251, 0.50);
				margin-top: 15rpx;
				text-align: center;
				color: #7683AA;
				font-family: "Microsoft YaHei UI";
				font-size: 24rpx;
				font-style: normal;
				font-weight: 400;
				line-height: 36rpx;
				padding: 5rpx 30rpx 5rpx 30rpx;
				margin-bottom: 10rpx;
			}
		}
	}

	.shadowBox {
		width: 5rpx;
		// height: 60vh;
		hheight: 100%;
		background-color: #fff;
		box-shadow: -10rpx -2rpx 10.4rpx 0rpx rgba(0, 0, 0, 0.06);
		z-index: 8;
	}

	.uni-badge {
		width: 40rpx;
		height: 40rpx;
	}

	.underbalance {
		z-index: 100;
		width: 722rpx;
		height: 100rpx;
		position: absolute;
		bottom: 55rpx;
		left: 15rpx;
		border-radius: 20rpx;
		background: #FEF9E3;
		text-align: center;
		line-height: 45rpx;
		color: #333;
		font-family: "Microsoft YaHei UI";
		font-size: 24rpx;
		font-style: normal;
		font-weight: 400;

		.priceStyle {
			color: #FF9307;
			font-family: "Microsoft YaHei UI";
			font-size: 24rpx;
			font-style: normal;
			font-weight: 400;
		}

		.cds {
			color: #FF9307;
			font-size: 24rpx;
			font-family: "Microsoft YaHei UI";
			font-weight: 400;
			margin-left: 10rpx;
		}
	}

	.iconDown {
		width: 46rpx;
		height: 46rpx;
		background-color: rgba(0, 0, 0, 0.8);
		border-radius: 50%;
		display: flex;
		justify-content: center;
		align-items: center;
		position: absolute;
		top: 20rpx;
		right: 30rpx;
	}

	.modelTitle {
		width: 100%;
		height: 50rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 20rpx 25rpx 0rpx 25rpx;

		.motitles {
			color: #333;
			font-family: "Microsoft YaHei UI";
			font-size: 40rpx;
			font-style: normal;
			font-weight: 700;
		}

		.moprice {
			color: #FC4C40;
			font-family: "Microsoft YaHei UI";
			font-size: 36rpx;
			font-style: normal;
			font-weight: 700;
		}
	}

	.separate {
		width: 90%;
		height: 40rpx;
		display: flex;
		padding-left: 25rpx;
		margin-top: 35rpx;

		.separate_line {
			width: 8rpx;
			height: 35rpx;
			background-color: #53A87F;
		}

		.separate_text {
			margin-left: 17rpx;
			color: #333;
			font-family: "Microsoft YaHei UI";
			font-size: 32rpx;
			font-style: normal;
			font-weight: 700;
		}
	}

	.selectSep {
		width: 100%;


		.sepList-item {
			display: flex;
			justify-content: space-between;
			align-items: center;
			width: 700rpx;
			height: 90rpx;
			margin: 25rpx 0rpx 0rpx 22rpx;
			border-radius: 10rpx;
			background: #F7F7F7;
			padding: 0px 20rpx 0rpx 20rpx;

			.sepCuname {
				color: #333;
				font-family: "Microsoft YaHei UI";
				font-size: 32rpx;
				font-style: normal;
				font-weight: 400;
			}

			.checkCun {
				font-size: 40rpx;
			}
		}

		.checkUn {
			border-radius: 10rpx;
			border: 2rpx solid #53A87F;
		}
	}

	.sureBtn {
		width: 700rpx;
		height: 90rpx;
		margin: 180rpx 0rpx 35rpx 22rpx;
		border-radius: 10rpx;
		background: #53A87F;
		text-align: center;
		line-height: 90rpx;
		color: #FFF;
		font-family: "Microsoft YaHei UI";
		font-size: 32rpx;
		font-style: normal;
		font-weight: 700;
		letter-spacing: 20rpx;
	}

	.re_title {
		color: #333;
		font-family: "Microsoft YaHei UI";
		font-size: 40rpx;
		font-style: normal;
		font-weight: 700;
		margin: 40rpx 0rpx 0rpx 60rpx;
	}

	.picker-view {
		width: 100%;
		height: 330rpx;
		margin-top: 30rpx;
	}

	.dateItem {
		line-height: 70rpx;
		text-align: center;
		color: #000;
		text-align: center;
		font-family: "PingFang SC";
		font-size: 36rpx;
		font-style: normal;
		font-weight: 400;
	}

	.footBtn {
		width: 100%;
		height: 100rpx;
		margin-top: 25rpx;
		margin-bottom: 35rpx;
		display: flex;
		justify-content: space-between;
		padding: 0rpx 35rpx 0rpx 35rpx;

		.Btns {
			width: 300rpx;
			height: 100%;
			padding: 32rpx 64rpx;
			border-radius: 86rpx;
			text-align: center;
			font-family: "Microsoft YaHei UI";
			font-size: 32rpx;
			font-style: normal;
			font-weight: 400;
		}

		.canelBtn {
			color: #666;
			background: #E7EAE8;
		}

		.subBtn {
			color: #fff;
			background: #53A87F;
			box-shadow: 0px 10px 40px 0px rgba(37, 94, 214, 0.26);
		}
	}

	.costBy {
		width: 578rpx;
		height: 224rpx;
		border-radius: 20rpx;
		margin: auto;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 0rpx 45rpx 0rpx 45rpx;
		font-family: "Microsoft YaHei UI";
		font-style: normal;
		font-weight: 700;
	}

	.byself {
		margin-top: 60rpx;
		background-image: url("https://cdn-static.yekjx.com/food/images/car_img06.png");
		background-size: 100% 100%;
		color: #92A6D8;
	}

	.bytog {
		margin-top: 30rpx;
		background-image: url("https://cdn-static.yekjx.com/food/images/car_img07.png");
		background-size: 100% 100%;
		color: #2CAC58;
	}

	.deal {
		width: 100vw;
		height: 40rpx;
		margin-top: 30rpx;
		display: flex;
		padding-left: 130rpx;
		margin-bottom: 35rpx;

		.bill {
			color: #999;
			font-family: "Microsoft YaHei UI";
			font-size: 24rpx;
			font-style: normal;
			font-weight: 400;
			line-height: 40rpx;
			margin-left: 10rpx;
		}
	}

	// 悬浮按钮展开样式
	.dragMain {
		// box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.2);
		border-radius: 40rpx;
		width: 156rpx; //120
		height: 156rpx; //120
		transition: width 0.2s ease-out;
		overflow: hidden;

		&.show {
			width: 644rpx;
			// height: 268rpx;
			height: 160rpx;

			.expend_box {
				height: 268rpx;
				background: #EBEFFB;

				// border-radius: 50%;
				.ex_top {
					width: 124rpx;
					height: 124rpx;
					border: none;
				}
			}
		}
	}

	.expend_box {
		padding: 20rpx 15rpx 20rpx 15rpx;
		width: 644rpx;
		// height:268rpx;
		// padding:20rpx 15rpx 20rpx 15rpx;
		background: none;
		// width:120rpx;
		// height: 120rpx;
		border-radius: 40rpx;
		// box-shadow: 0px 0px 13.4px 0px rgba(0, 0, 0, 0.20);
		// display: flex;
		// justify-content: space-between;
		position: relative;
		// flex-wrap: wrap;


		// &.show{
		// 	width: 644rpx;
		// 	opacity: 1;
		// 	padding:20rpx 15rpx 20rpx 15rpx;
		// 	height:268rpx;
		// 	.ex_top{
		// 		width:120rpx;
		// 		height:120rpx;
		// 		border: none;
		// 	}
		// }
		.exitem {
			width: 154rpx;
			height: 130rpx;
		}

		.ex_top {
			width: 112rpx;
			height: 112rpx;
			border-radius: 50%;
			background: #FF9307;
			color: #fff;
			border: 8rpx solid #fff;
			box-shadow: 0px 2px 10rpx 0px rgba(0, 0, 0, 0.3);
		}

		.an_icons {
			position: absolute;
			left: 0rpx;
			top: 46rpx;
			width: 38rpx;
			height: 38rpx;
			border-radius: 80rpx;
			background: rgba(255, 255, 255, 0.90);
			display: flex;
			justify-content: center;
			align-items: center;
		}

		.fn_toCal {
			font-family: "Microsoft YaHei UI";
			font-size: 30rpx;
			font-weight: 700;
			margin-top: 10rpx;
			height: 30rpx;
			line-height: 29rpx;
		}

		.martmin {
			padding-top: 3rpx;
		}

		.fn_unit {
			font-family: "Microsoft YaHei UI";
			font-size: 20rpx;
			font-weight: 400;
			height: 30rpx;
			line-height: 29rpx;
		}

		.fn_units {
			font-family: "Microsoft YaHei UI";
			font-size: 20rpx;
			font-weight: 400;
			height: 20rpx;
			line-height: 19rpx;
		}

		.oth_box {
			width: 124rpx;
			height: 124rpx;
			border-radius: 50%;
			font-family: "Microsoft YaHei UI";
			text-align: center;
			padding-top: 10rpx;
			position: relative;
			background-size: 130% 130%;
			background-position-x: -20rpx;
			background-position-y: -20rpx;

			.list_name {
				color: #333;
				font-size: 24rpx;
				font-weight: 400;
				margin-top: 12rpx;
				z-index: 1;
				line-height: 1;
			}

			.list_value {
				color: #333;
				font-size: 35rpx;
				font-weight: 700;
				z-index: 1;
				margin-top: 15rpx;
				line-height: 1;
			}
		}

		.change_box {
			min-width: 110rpx;
			height: 110rpx;
			padding: 10rpx 0;
			text-align: center;

			.ch_val {
				color: #333;
				font-family: "Microsoft YaHei UI";
				font-size: 40rpx;
				font-weight: 400;
			}

			.ch_name {
				color: #999;
				font-family: "Microsoft YaHei UI";
				font-size: 24rpx;
				font-weight: 400;
				margin-top: 10rpx;
			}
		}
	}

	//悬浮按钮样式
	.fix_navbox {
		width: 145rpx;
		height: 145rpx;
		overflow: hidden;
		transform-origin: right center;
		// transform:translateX(0rpx);
		transition: width 0.2s ease-out;
		display: block;

		// transition: transform 0.2s ease-out;
		&.show {
			display: none;
			// width: 400rpx;num:3
			// width: 145rpx;
			// transform:translateX(-644rpx);
			// transform-origin: right;
		}
	}

	.padding-top-xxs {
		padding-top: 6rpx;
	}

	.fnavcontain {
		position: absolute;
		left: 0;
		top: 0;
		display: flex;

		.fist_box {
			position: relative;
			width: 134rpx;
			height: 134rpx;
			border-radius: 50%;
			box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.20);
			// padding: 8rpx 0rpx 0rpx 8rpx;
			background-image: url("https://cdn-static.yekjx.com/food/ico/images/car_bg07.png");
			background-size: 100% 100%;
			margin-top: 2rpx;
			margin-left: 2rpx;

			.fist_boxitem {
				width: 112rpx;
				height: 112rpx;
				// background: #FF9307;
				border-radius: 50%;
				text-align: center;
				font-style: normal;
				color: #FFF;
				// margin: 5rpx 0rpx 0rpx 5rpx;
				padding: 6rpx 0rpx 6rpx 0rpx;

				.fn_toCal {
					font-family: "Microsoft YaHei UI";
					font-size: 32rpx;
					font-weight: 700;
				}

				.martmin {
					padding-top: 3rpx;
				}

				.fn_unit {
					font-family: "Microsoft YaHei UI";
					font-size: 20rpx;
					font-weight: 400;
					line-height: 1;
				}
			}

			.an_icons {
				position: absolute;
				left: 1rpx;
				top: 50rpx;
				width: 38rpx;
				height: 38rpx;
				border-radius: 80rpx;
				background: rgba(255, 255, 255, 0.90);
				display: flex;
				justify-content: center;
				align-items: center;

				// transform: rotateY(180deg);
				&.xzbox {
					// transform: rotateY(360deg);
				}
			}
		}

		// .oth_box {
		// 	width: 134rpx;
		// 	height: 134rpx;
		// 	margin: 5rpx 0rpx 0rpx 20rpx;
		// 	border-radius:30rpx;
		// 	font-family: "Microsoft YaHei UI";
		// 	text-align: center;
		// 	padding-top: 20rpx;
		// 	position: relative;
		// 	background-size: 130% 130%;
		// 	background-position-x: -20rpx;
		// 	background-position-y: -20rpx;
		//     box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.20);
		// 	.list_name {
		// 		color: #333;
		// 		font-size: 24rpx;
		// 		font-weight: 400;
		// 		margin-top: 17rpx;
		// 		z-index: 1;
		// 		line-height: 1;
		// 	}

		// 	.list_value {
		// 		color: #333;
		// 		font-size: 40rpx;
		// 		font-weight: 700;
		// 		z-index: 1;
		// 		margin-top: 9rpx;
		// 		line-height: 1;
		// 	}
		// }
	}

	.mask {
		width: 100vw;
		height: 100vh;
		background-color: rgba(0, 0, 0, 0.20);
		position: absolute;
		z-index: 10;

		.maskContent {
			width: 100vw;
			position: fixed;
			left: 0;
			bottom: 0;
			min-height: 100rpx;
			background-color: #fff;
			padding-bottom: 270rpx;
		}
	}



	.sc_item {
		width: 100%;
		text-align: center;
		margin: 0;
		border: none;
		min-height: 90rpx;
		position: relative;
		height: auto;
		// padding: 6rpx 0 6rpx 0;

		.par_item {
			width: 100%;
			height: 100%;
			background-color: #fff;
			display: flex;
			justify-content: center;
			align-items: center;
			position: relative;
		}

		.par_item_item {
			flex: 1;
			position: relative;

			.menus_tags_box {
				display: flex;
				justify-content: flex-end;

				.menus_tags {
					max-width: calc(100% - 30rpx);
					overflow: hidden;
					height: 28rpx;
					border-radius: 30rpx 28rpx 28rpx 0;
					background: #F00;
					font-size: 16rpx;
					font-weight: 400;
					color: #fff;
					padding: 0 6rpx;
					margin-right: 30rpx;
					line-height: 28rpx;
					text-align: center;
				}
			}

		}

		.cur {
			background-color: #fff;
			color: #648C6A;
			text-align: center;
			font-family: "Microsoft YaHei UI";
			font-size: 28rpx;
			font-style: normal;
			font-weight: 700;
			background-color: #53A87F;
			width: 14rpx;
			height: 120rpx;

		}

		// .cur::after {
		// 			content: "";
		// 			width: 8rpx;
		// 			// height: 105.6rpx;
		// 			height:calc(100% - calc(100% - 105rpx));
		// 			position: absolute;
		// 			background-color: #53A87F;
		// 			top: 0rpx;
		// 			left: 0rpx;
		// 			bottom: 0;
		// 		}
		// .cur::after {
		// 	content: "";
		// 	width: 8rpx;
		// 	// height: 105.6rpx;
		// 	height:calc(100% - calc(100% - 105rpx));
		// 	position: absolute;
		// 	background-color: #53A87F;
		// 	top: 0rpx;
		// 	left: 0rpx;
		// 	bottom: 0;
		// }

		.uncur {
			color: #666;
			text-align: center;
			font-family: "Microsoft YaHei UI";
			font-size: 28rpx;
			font-style: normal;
			font-weight: 400;
			width: 14rpx;
			height: 120rpx;
		}
	}

	.sc_item:nth-child(n+2) {
		margin-top: 10rpx;
	}

	.view-box-chindred {
		color: #666;
		text-align: center;
		font-family: "Microsoft YaHei UI";
		font-size: 25rpx;
		font-style: normal;
		font-weight: 400;
		min-height: 80rpx;
		height: auto;
		margin-top: 10rpx;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.childrenActive {
		color: #648C6A;
		font-family: "Microsoft YaHei UI";
		font-size: 28rpx;
		font-weight: 700;
		letter-spacing: 0.83rpx;
		background: rgba(255, 255, 255, 0.70);
		width: 100%;
		height: 100%;
	}

	.storeInfo_c {
		width: 100vw;
		min-height: 100rpx;
		padding: 0rpx 50rpx 0rpx 50rpx;

		.titles_c {
			text-align: center;
			color: #333;
			font-family: "Microsoft YaHei UI";
			font-size: 40rpx;
			font-weight: 700;
			margin-top: 20rpx;
		}

		.c_cont_n {
			display: flex;
			justify-content: space-between;

			.cont_na {
				color: #333;
				font-family: "Microsoft YaHei UI";
				font-size: 40rpx;
				font-weight: 700;
				margin-top: 20rpx;
			}

			.cont_na_l {
				font-size: 28rpx;
				color: #666;
				margin-top: 30rpx;
			}
		}

		.door_inf {
			color: #999;
			font-family: "Microsoft YaHei UI";
			font-size: 32rpx;
			font-weight: 400;
			margin-top: 20rpx;
		}

		.store_bt {
			height: 40rpx;
			margin-top: 40rpx;
			display: flex;
			margin-bottom: 35rpx;

			.bt_item {
				color: #53A87F;
				font-family: "Microsoft YaHei UI";
				font-size: 28rpx;
				font-weight: 400;
			}

			.invs_h {
				width: 2rpx;
				height: 22rpx;
				background-color: #999;
				margin: 8rpx 67rpx 0rpx 67rpx;
			}
		}

		.invs {
			height: 2rpx;
			background-color: #F3F3F3;
			margin-top: 40rpx;
		}
	}

	.btns {
		width: 100%;
		height: 136rpx;
		border-radius: 0rpx 0rpx 20rpx 20rpx;
		border-top: 2rpx solid #F7F7F7;
		justify-content: space-between;
		padding: 20rpx 20rpx 0rpx 20rpx;
		background-color: #fff;

		.f_pri {
			line-height: 120rpx;
			font-size: 48rpx;
			color: #FC4C40;
		}

		.f_sub {
			width: 396rpx;
			height: 80rpx;
			border-radius: 10rpx;
			background: #53A87F;
			color: #fff;
			text-align: center;
			line-height: 80rpx;
			letter-spacing: 2rpx;
		}
	}

	.pu_content {
		width: 700rpx;

		.pucon_c {
			background-color: #fff;
			border-radius: 20rpx 20rpx 0rpx 0rpx;
			max-height: 650rpx;
			overflow-y: scroll;
			padding: 20rpx 20rpx 20rpx 20rpx;

			.pucon_c_t {
				// position: sticky;
				// left:0;
				// top:0;
				// background-color: #fff;
				// line-height: 50rpx;
			}

			.separate {
				width: 90%;
				height: 40rpx;
				display: flex;
				padding-left: 25rpx;
				margin-top: 40rpx;

				.separate_line {
					width: 8rpx;
					height: 35rpx;
					background-color: #53A87F;
				}

				.separate_text {
					margin-left: 17rpx;
					color: #333;
					font-family: "Microsoft YaHei UI";
					font-size: 32rpx;
					font-style: normal;
					font-weight: 700;
				}
			}
		}

		.gg_box {
			min-height: 30rpx;
			flex-wrap: wrap;

			.sepList-item {
				width: 314rpx;
				height: 100rpx;
				border-radius: 120rpx;
				background: #F7F7F7;
				margin-left: 10rpx;
				margin-top: 20rpx;
				text-align: center;
				line-height: 100rpx;
				color: #333;
				padding: 0rpx 20rpx 0rpx 20rpx;
			}

			.checkUn {
				border: 2rpx solid #53A87F;
			}
		}
	}

	.ballShow {
		width: 100rpx;
		height: 40rpx;
		position: absolute;
		bottom: 40rpx;
		left: 180rpx;
		z-index: 99;
	}

	.vip_tips {
		width: 100vw;
		height: 84rpx;
		position: absolute;
		left: 0;
		top: 0; //470
		z-index: 10;
		display: flex;
		justify-content: space-between;
		align-items: center;
		background: #FFF4E4;
		padding: 0rpx 20rpx 0rpx 20rpx;
		animation: hids 600ms;

		@keyframes hids {
			0% {
				opacity: 0;
			}

			100% {
				opacity: 1;
			}
		}

		.tip_text {
			color: #FF9700;
			font-family: "Microsoft YaHei UI";
			font-size: 32rpx;
			font-weight: 700;
			margin-left: 10rpx;
		}

		.getVip {
			color: #5DB175;
			font-family: "Microsoft YaHei UI";
			font-size: 28rpx;
			font-weight: 700;
		}
	}

	.numbx {
		// margin-top: 4rpx;
		// margin-left: 10rpx;
	}

	.fav_box:nth-child(n+2) {
		border-top: 2rpx solid #E4E4E4;
	}

	.fav_box {
		width: 100%;
		min-height: 304rpx;
		margin-top: 20rpx;
		display: flex;
		padding: 20rpx 0rpx 10rpx 20rpx;
		position: relative;

		.immsb {
			position: absolute;
			left: 15rpx;
			top: 5rpx;
			z-index: 8;
			width: 52rpx;
			height: 58rpx
		}

		.showImgs {
			width: 226rpx;
			height: 226rpx;
			position: relative;
			overflow: hidden;

			.imms {
				width: 100%;
				height: 100%;
				border-radius: 26rpx;
			}

			.hy {
				position: absolute;
				right: 0;
				bottom: 0rpx;
				z-index: 8;
				width: 36rpx;
				height: 36rpx;
				line-height: 37rpx;
				background-color: #F5A623;
				border-radius: 10rpx 0rpx 20rpx 0rpx;

				.hs_s {
					color: #fff;
					font-size: 24rpx;
					display: block;
					padding-left: 6rpx;
					padding-top: 4rpx;
				}
			}
		}

		.shopinfo {
			width: 490rpx;
			height: 100%;
			margin-left: 30rpx;

			.shopinfo-shopname {
				color: #000;
				font-family: "Microsoft YaHei UI";
				font-size: 32rpx;
				font-style: normal;
				font-weight: 700;
			}

			.showinfo-tag {
				display: flex;
				flex-wrap: wrap;
				margin-top: 15rpx;

				.kcal {
					border-radius: 4rpx;
					background: #FDF6EC;
					color: #FC4C40;
					font-family: "Microsoft YaHei UI";
					font-size: 24rpx;
					font-style: normal;
					font-weight: 700;
					padding: 5rpx 10rpx 5rpx 10rpx;
				}

				.sweet {
					font-weight: 400;
				}

				.fat {
					font-weight: 400;
				}

				.kcal:nth-child(n+2) {
					margin-left: 15rpx;
				}
			}

			.shop-hasDishes {
				color: #333;
				font-family: "Microsoft YaHei UI";
				font-size: 20rpx;
				font-style: normal;
				font-weight: 400;
				margin-top: 15rpx;
			}

			.show-price {
				width: 100%;
				height: 100rpx;
				margin-top: 15rpx;
				display: flex;
				justify-content: space-between;
				padding-right: 10rpx;

				.price {
					align-items: normal;
					color: #FC4C40;
					font-family: "Microsoft YaHei UI";
					font-size: 36rpx;
					font-style: normal;
					font-weight: 700;

					.qh_fav {
						width: 56rpx;
						height: 32rpx;
						border-radius: 8rpx;
						border: 1rpx solid #53A87F;
						background: rgba(83, 168, 127, 0.10);
						color: #53A87F;
						text-align: center;
						font-family: "PingFang SC";
						font-size: 20rpx;
						font-style: normal;
						font-weight: 400;
						line-height: 32rpx;
						display: inline-block;
					}

					.totalReduce {
						color: #999;
						font-family: "Microsoft YaHei UI";
						font-size: 20rpx;
						font-style: normal;
						font-weight: 400;
						text-decoration: line-through;
					}

					.limited {
						color: #999;
						font-family: "Microsoft YaHei UI";
						font-size: 20rpx;
						font-style: normal;
						font-weight: 400;
					}
				}

				.priceBtnAv {
					width: 152rpx;
					height: 52rpx;
					border-radius: 26.4rpx;
					background: #53A87F;
					text-align: center;
					line-height: 52rpx;
					color: #fff;
					margin-top: 17rpx;
				}

				.priceBtnAvs {
					width: 152rpx;
					height: 52rpx;
					border-radius: 26.4rpx;
					background: #E7EAE8;
					text-align: center;
					line-height: 52rpx;
					color: #666;
					margin-top: 17rpx;
				}

				.priceBtnAU {
					width: 152rpx;
					height: 52rpx;
					border-radius: 26.4rpx;
					background: #53A87F;
					text-align: center;
					line-height: 52rpx;
					color: #fff;
					margin-top: 17rpx;
				}

				.prUniss {
					width: 45rpx;
					height: 45rpx;
					border-radius: 50%;
					background-color: #53A87F;
				}

				.prUnis {
					width: 45rpx;
					height: 45rpx;
					border-radius: 50%;
					background-color: #E7EAE8;
				}
			}

			.evaluate {
				width: max-content;
				height: 40rpx;
				border-radius: 10rpx;
				background: rgba(235, 239, 251, 0.50);
				margin-top: 15rpx;
				text-align: center;
				color: #7683AA;
				font-family: "Microsoft YaHei UI";
				font-size: 24rpx;
				font-style: normal;
				font-weight: 400;
				line-height: 36rpx;
				padding: 5rpx 30rpx 5rpx 30rpx;
				margin-bottom: 10rpx;

			}
		}
	}

	.isDown {
		position: absolute;
		left: 0;
		bottom: 0;
		z-index: 8;
		width: 220rpx;
		height: 46rpx;
		border-radius: 0px 0px 26rpx 26rpx;
		background: rgba(0, 0, 0, 0.50);
		text-align: center;
		color: #fff;
	}

	.spo_top {
		width: 100%;
		height: 56rpx;
		margin-top: 50rpx;
		display: flex;
		justify-content: space-between;
		padding: 0rpx 30rpx 0rpx 30rpx;

		.top_l {
			color: #333;
			font-family: "Microsoft YaHei UI";
			font-size: 40rpx;
			font-weight: 400;
		}

		.top_actions {
			display: flex;

			.top_ac_btn {
				width: 152rpx;
				height: 52rpx;
				border-radius: 5px;
				border: 2rpx solid #999;
				color: #666;
				font-family: "Microsoft YaHei UI";
				font-size: 28rpx;
				font-weight: 400;
				line-height: 52rpx;
				text-align: center;
			}
		}
	}

	.spoUserList {
		width: 100%;
		height: 72rpx;
		margin-top: 10rpx;
		display: flex;
		padding: 0rpx 40rpx 0rpx 40rpx;

		.spoList_ltem {
			width: 72rpx;
			height: 72rpx;
			border-radius: 50%;
			background-color: #E1FCF1;
			text-align: center;
			line-height: 72rpx;
			position: relative;

			.item_ims {
				width: 72rpx;
				height: 72rpx;
				border-radius: 50%;
			}

			&:nth-child(n+2) {
				margin-left: 15rpx;
			}

			.sendUser {
				position: absolute;
				bottom: -15rpx;
				left: -10rpx;
				width: 88rpx;
				height: 36rpx;
				border-radius: 14rpx;
				border: 2rpx solid #2CAC58;
				background: #FFF;
				color: #999;
				font-family: "Microsoft YaHei UI";
				font-size: 24rpx;
				font-weight: 400;
				text-align: center;
				line-height: 36rpx;
			}
		}
	}

	.arriv_text {
		width: 100%;
		height: 45rpx;
		padding: 0rpx 30rpx 0rpx 30rpx;
		margin-top: 13rpx;
		line-height: 45rpx;
		color: #666;
		font-family: "Microsoft YaHei UI";
		font-size: 24rpx;
		font-weight: 400;

		.arr_a_a {
			color: #53A87F;
			font-family: "Microsoft YaHei UI";
			font-size: 28rpx;
			font-weight: 400;
		}
	}

	.balance_shut {
		width: 100vw;
		height: 160rpx; //158
		position: fixed;
		bottom: 0rpx;
		left: 0rpx;
		z-index: 999;
		display: flex;
		border-radius: 60rpx 60rpx 0px 0px;
		background: #231F20;
		align-items: center;
		padding: 0 20rpx 10rpx 20rpx;

		.shut_image {
			width: 130rpx;
			height: 130rpx;
		}

		.shut_contsBy {
			width: 100%;
			height: 100%;
			padding-top: 20rpx;

			.center_text {
				color: #FFF;
				font-size: 32rpx;
				font-weight: 700;
				text-align: center;
				width: 100%;
			}

			.center_by_btn {
				width: 236rpx;
				height: 52rpx;
				border-radius: 26rpx;
				border: 2rpx solid #FFF;
				line-height: 52rpx;
				color: #FFF;
				font-size: 28rpx;
				font-weight: 400;
				margin: 25rpx auto;
				text-align: center;
			}
		}

		.shut_conts {
			width: calc(100vw - 170rpx);
			height: 100%;
			margin-left: 20rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;

			.closeShop_text {

				color: #FFF;
				font-size: 24rpx;
				font-weight: 400;

				// display: flex;
				// justify-content: center;
				// align-items: center;
				.kf_ico {
					font-size: 65rpx;
					margin-left: 15rpx;
				}

				.kf_texts {
					margin-right: 40rpx;
				}

				.closeShop_tel {
					border-radius: 50%;
					border: 2rpx solid #FFF;
					width: 32rpx;
					height: 32rpx;
					margin: 0 20rpx 0 10rpx;
					display: flex;
					justify-content: center;
					align-items: center;

					.tel_icons {
						font-size: 20rpx;
						color: #fff;
					}
				}
			}

			.shut_cont_left {
				.left_c_t {
					color: #FFF;
					font-size: 40rpx;
					font-weight: 700;
					display: block;
				}

				.left_c_d {
					color: #FFF;
					font-size: 24rpx;
					font-weight: 400;
					display: block;
					margin-top: 15rpx;
				}
			}

			.shut_btns {
				width: 204rpx;
				height: 74rpx;
				text-align: center;
				line-height: 74rpx;
				border-radius: 56rpx;
				background: #53A87F;
				color: #FFF;
				font-size: 32rpx;
				font-weight: 400;
				margin-top: 15rpx;
			}
		}
	}

	.cups_box {
		width: 100vw;
		height: 40rpx;
		margin-top: 14rpx;
		padding-right: 20rpx;

		.cups_item {
			display: inline-block;

			.cups_item_item {
				display: flex;
				width: auto;
				border-radius: 8rpx;
				border: 2rpx solid #FFADA8;
				margin-left: 20rpx;
				color: #F00;
				text-align: center;
				font-size: 24rpx;
				font-weight: 400;
				justify-content: space-between;
				height: 40rpx;
				line-height: 40rpx;

				.item_evls {
					width: 44rpx;
					border-radius: 0rpx 8rpx 8rpx 0rpx;
					background: rgba(255, 0, 0, 0.10);
					height: 100%;
					text-align: center;
					display: flex;
					justify-content: center;
					height: 40rpx;
					line-height: 40rpx;
				}
			}
		}
	}

	.vnames {
		position: sticky;
		top: -1rpx;
		left: 0;
		width: 100%;
		height: 50rpx;
		background-color: #fff;
		font-weight: 700;
	}

	.textLineTh {
		text-decoration: line-through;
	}

	.lvimg {
		width: 66rpx;
		height: 54rpx;
	}

	.address_boxes {
		width: 100%;
		min-height: 100rpx;
		margin-top: 15rpx;
		display: flex;
		justify-content: space-between;
		// align-items: center;
		padding: 10rpx 20rpx 10rpx 20rpx;

		.lives {
			width: 160rpx;
			height: 100%;
			text-align: center;

			.lives_icon {
				font-size: 46rpx;
				color: #ABCEBD;
			}

			.lives_texts {
				color: #FC4C40;
				font-size: 24rpx;
				margin-top: 10rpx;
			}
		}

		.shop_names {
			color: #000;
			font-size: 28rpx;

			.shop_icos {
				font-size: 24rpx;
				color: #666;
			}
		}

		.shop_distances {
			color: #999;
			font-size: 28rpx;
			margin-top: 10rpx;
		}
	}

	.swiper_top {
		width: 100%;
		height: 150rpx;
		background-color: #fff;
		margin-top: 20rpx;

		// padding-top:20rpx;
		.swipersInter {
			width: 100%;
			height: 20rpx;
		}

		.swiper_boxs {
			width: 100%;
			height: 130rpx;
			border-radius: 20rpx;
			background: rgba(247, 247, 247, 0.50);
			margin: auto;
			display: flex;
			align-items: center;

			// padding: 0 20rpx 0 20rpx;
			.min_element {
				// width: 116rpx;
				flex: 1;
				height: 130rpx;

				// border:1px solid red;
				// padding-right: 10rpx;
				.element_name {
					color: #53A87F;
					font-size: 22rpx;
					width: 100%;
					margin-top: 26rpx;
				}

				.element_values {
					width: 100%;
					margin-top: 10rpx;

					.values_eat {
						color: #333;
						font-size: 30rpx;
					}

					.values_to {
						color: rgba(83, 168, 127, 0.70);
						font-size: 22rpx;
					}
				}
			}

			.main_element {
				width: 150rpx;
				// flex:1.2;
				height: 130rpx;
				// border:1px solid blue;
			}
		}
	}

	.sales_box {
		width: 100%;
		height: 32rpx;
		display: flex;
		// justify-content: flex-start;
		align-items: center;
		margin-top: 15rpx;

		.sales_box_item {
			min-width: 90rpx;
			height: 100%;
			border-radius: 8rpx;
			background: #FDF6EC;
			color: #B7662F;
			font-size: 20rpx;
			padding: 0rpx 5rpx 0rpx 5rpx;
			display: flex;
			justify-content: center;
			align-items: center;

			&:nth-child(n+2) {
				margin-left: 10rpx;
			}
		}
	}

	.commonBgCor {
		background-color: #fff;
	}

	.topPaddingBox {
		width: 100%;
	}

	.live_esss {
		color: #FF9700;
		font-size: 24rpx;
		margin-top: 20rpx;
	}

	.priceCommon {
		position: absolute;
		right: 10rpx;
		top: 0;
		background-color: #fff;
	}

	.left_s {
		display: flex;
		justify-content: center;
		align-items: center;
		margin-top: 5rpx;
	}

	.badges {
		width: 30rpx;
		height: 30rpx;
		position: absolute;
		right: 0;
		top: -20rpx;
	}

	.difPrice {
		color: rgba(255, 255, 255, 0.7);
		font-size: 24rpx;
		font-weight: 400;
		height: 100%;
		display: flex;
		justify-content: center;
		align-items: center;
		margin-right: 8rpx;
	}

	.searchMenus {
		width: 64rpx;
		height: 64rpx;
		border-radius: 32rpx;
		border: 2rpx solid rgba(153, 153, 153, 0.2);
		margin-left: 50rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		font-size: 34rpx;
		// position: relative;
		// float: right;
		position: fixed;
		right:100px;

	}
	.dtgoods{
		width: calc(100vw - 40rpx);
	}
	.showImgs_mup {
		width: 100%;
		height: 226rpx;
		margin-left: -20rpx;

		&:nth-child(n+2) {
			margin-top: 20rpx;
		}
	}
	.pageConts {
		width: 100vw;
		background-color: #fff;
	
		.reflash_ico {
			width: 420rpx;
			height: 64rpx;
			border-radius: 35px;
			border: 2rpx solid #F3F3FF;
			background: #F7F7F7;
			margin-left: 95rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding-right: 20rpx;
	
			.inputs {
				text-align: left;
				width: 345rpx;
				height: 100%;
				color: #000;
				padding: 0 20rpx;
			}
		}
	
		.invs {
			width: 100vw;
			height: 2rpx;
			background: rgba(219, 219, 219, 1);
		}
	}
	
	.VerticalMain {
		background-color: #fff;
		padding: 25rpx 0rpx 40rpx 10rpx;
		position: relative;
		width: 100%;
		height: 200rpx;
	}
	.cu-bar {
		width: 100%;
		min-height: 304rpx;
		display: flex;
		align-items: normal;
		border-bottom: 1rpx solid #E4E4E4;
		padding: 15px 5rpx 15rpx 25rpx;
		position: relative;
	
		&:nth-last-child(1) {
			margin-bottom: 20rpx;
			border:none;
		}
	
		.immsb {
			position: absolute;
			left: 15rpx;
			top: 5rpx;
			z-index: 8;
			width: 52rpx;
			height: 58rpx
		}
	
		.showImgs {
			width: 226rpx;
			height: 226rpx;
			position: relative;
			overflow: hidden;
	
			.spcPrice {
				position: absolute;
				left: 0;
				bottom: 0;
				border-radius: 0px 26rpx;
				background: linear-gradient(90deg, #FF7A00 -10.89%, #FCDCBF 138.82%);
				width: 94rpx;
				height: 44rpx;
				text-align: center;
				line-height: 44rpx;
	
				.spcPrice_icons {
					font-size: 22rpx;
					color: #fff;
				}
			}
	
			.sellOut {
				position: absolute;
				left: 0;
				bottom: 0;
				width: 100%;
				height: 40rpx;
				border-radius: 0px 0px 26rpx 26rpx;
				background: rgba(0, 0, 0, 0.50);
				color: #fff;
				text-align: center;
				line-height: 40rpx;
				letter-spacing: 5rpx;
				color: #FFF;
				font-size: 28rpx;
				font-style: normal;
				font-weight: 400;
				z-index: 9;
			}
	
			.imms {
				width: 100%;
				height: 100%;
				border-radius: 26rpx;
			}
	
			.hy {
				position: absolute;
				right: 0;
				bottom: 0rpx;
				z-index: 8;
				width: 36rpx;
				height: 36rpx;
				line-height: 37rpx;
				background-color: #F5A623;
				border-radius: 10rpx 0rpx 20rpx 0rpx;
	
				.hs_s {
					color: #fff;
					font-size: 24rpx;
					display: block;
					padding-left: 6rpx;
					padding-top: 4rpx;
				}
			}
		}
	
		.shopinfo {
			width: 292rpx;
			height: 100%;
			position: relative;
	
			.juanhouStyle {
				.juanhouStylefsizi {
					color: #FC4C40;
					font-family: "Microsoft YaHei UI";
					font-size: 10px;
					font-weight: 400;
					line-height: normal;
					margin-top: 10rpx;
					margin-right: 4rpx;
				}
	
				.juanhoupic {
					color: #FC4C40;
					font-family: "Microsoft YaHei UI";
					font-size: 36rpx;
					font-style: normal;
					font-weight: 700;
					line-height: normal;
				}
	
				.couponIssuance {
					width: 56rpx;
					height: 32rpx;
					flex-shrink: 0;
					border-radius: 4px;
					border: 0.5px solid #53A87F;
					background: rgba(83, 168, 127, 0.10);
					margin-left: 10rpx;
					// position: absolute;
					// bottom: 0rpx;
					// left:90rpx;
					color: #53A87F;
					font-size: 20rpx;
					font-weight: 400;
					line-height: 32rpx;
					/* 160% */
					display: flex;
					justify-content: center;
					align-items: center;
				}
			}
	
			.shopinfo-shopname {
				color: #000;
				font-family: "Microsoft YaHei UI";
				font-size: 32rpx;
				font-style: normal;
				font-weight: 700;
			}
	
			.showinfo-tag {
				display: flex;
				flex-wrap: wrap;
				justify-content: flex-start;
				min-height: 32rpx;
	
				.kcal {
					border-radius: 8rpx;
					border: 0.5rpx solid #53A87F;
					color: #53A87F;
					font-size: 22rpx;
					font-style: normal;
					font-weight: 700;
					padding: 5rpx 10rpx 5rpx 10rpx;
					margin-top: 15rpx;
					margin-right: 10rpx;
					display: flex;
					justify-content: center;
					align-items: center;
				}
			}
	
			.shop-hasDishes {
				color: #333;
				font-family: "Microsoft YaHei UI";
				font-size: 24rpx;
				font-style: normal;
				font-weight: 400;
				margin-top: 15rpx;
				margin-bottom: 18rpx;
			}
	
			.show-price {
				width: 100%;
				height: 60rpx;
				margin-top: 15rpx;
				display: flex;
				justify-content: space-between;
				padding-right: 10rpx;
				position: relative;
	
				.price {
					align-items: normal;
					color: #FC4C40;
					font-size: 36rpx;
					font-style: normal;
					font-weight: 700;
					position: relative;
					padding-top: 4rpx;
	
					.totalReduce {
						color: #999;
						font-size: 24rpx;
						font-style: normal;
						font-weight: 400;
						text-decoration: line-through;
						margin-left: 10rpx;
					}
					.totalReduceTc{
						color: #999;
						font-size: 24rpx;
						font-style: normal;
						font-weight: 400;
						margin-left: 10rpx;
					}
					.limited {
						color: #999;
						font-size: 24rpx;
						font-style: normal;
						font-weight: 400;
					}
				}
	
				.priceBtnAv {
					min-width: 112rpx;
					height: 52rpx;
					border-radius: 26.4rpx;
					background: #53A87F;
					line-height: 52rpx;
					color: #fff;
					margin-top: 4rpx;
					display: flex;
					justify-content: center;
					align-items: center;
				}
	
				.priceBtnAvs {
					min-width: 112rpx;
					height: 52rpx;
					border-radius: 26.4rpx;
					background: #E7EAE8;
					line-height: 52rpx;
					color: #666;
					margin-top: 4rpx;
					display: flex;
					justify-content: center;
					align-items: center;
				}
	
				.priceBtnAU {
					min-width: 112rpx;
					height: 52rpx;
					border-radius: 26.4rpx;
					background: #53A87F;
					line-height: 52rpx;
					color: #fff;
					margin-top: 4rpx;
					display: flex;
					justify-content: center;
					align-items: center;
				}
	
				.prUniss {
					width: 45rpx;
					height: 45rpx;
					border-radius: 50%;
					background-color: #53A87F;
				}
	
				.prUnis {
					width: 45rpx;
					height: 45rpx;
					border-radius: 50%;
					background-color: #E7EAE8;
				}
			}
	
			.evaluate {
				width: max-content;
				height: 40rpx;
				border-radius: 10rpx;
				background: rgba(235, 239, 251, 0.50);
				margin-top: 15rpx;
				text-align: center;
				color: #7683AA;
				font-family: "Microsoft YaHei UI";
				font-size: 24rpx;
				font-style: normal;
				font-weight: 400;
				line-height: 36rpx;
				padding: 5rpx 30rpx 5rpx 30rpx;
				margin-bottom: 10rpx;
			}
		}
	}
	.sales_box {
		width: 100%;
		height: 32rpx;
		display: flex;
		// justify-content: flex-start;
		align-items: center;
		margin-top: 15rpx;
	
		.sales_box_item {
			min-width: 90rpx;
			height: 100%;
			border-radius: 8rpx;
			background: #FDF6EC;
			color: #B7662F;
			font-size: 20rpx;
			padding: 0rpx 5rpx 0rpx 5rpx;
			display: flex;
			justify-content: center;
			align-items: center;
	
			&:nth-child(n+2) {
				margin-left: 10rpx;
			}
		}
	}
	.clear_icos{
		color:#D9D9D9;
		font-size: 40rpx;
	}
	.balance_shut {
		width: 100vw;
		height: 160rpx; //158
		position: fixed;
		bottom: 110rpx;
		left: 0rpx;
		z-index: 999;
		display: flex;
		border-radius: 60rpx 60rpx 0px 0px;
		background: #231F20;
		align-items: center;
		padding: 0 20rpx 10rpx 20rpx;
	
		.shut_image {
			width: 130rpx;
			height: 130rpx;
		}
	  .shut_contsBy{
			width: 100%;
			height:100%;
			padding-top: 20rpx;
			.center_text{
				color: #FFF;
				font-size: 32rpx;
				font-weight: 700;
				text-align: center;
				width: 100%;
			}
			.center_by_btn{
				width: 236rpx;
				height: 52rpx;
				border-radius: 26rpx;
				border: 2rpx solid #FFF;
				line-height: 52rpx;
				color: #FFF;
				font-size: 28rpx;
				font-weight: 400;
				margin: 25rpx auto;
				text-align: center;
			}
		}
		.shut_conts {
			width: calc(100vw - 170rpx);
			height: 100%;
			margin-left: 20rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
	
			.closeShop_text {
			
				color: #FFF;
				font-size: 24rpx;
				font-weight: 400;
				// display: flex;
				// justify-content: center;
				// align-items: center;
	      .kf_ico{
					font-size: 65rpx;
					margin-left:15rpx;
				}
				.kf_texts{
					margin-right: 40rpx;
				}
				.closeShop_tel {
					border-radius: 50%;
					border: 2rpx solid #FFF;
					width: 32rpx;
					height: 32rpx;
					margin: 0 20rpx 0 10rpx;
					display: flex;
					justify-content: center;
					align-items: center;
	
					.tel_icons {
						font-size: 20rpx;
						color: #fff;
					}
				}
			}
	
			.shut_cont_left {
				.left_c_t {
					color: #FFF;
					font-size: 40rpx;
					font-weight: 700;
					display: block;
				}
	
				.left_c_d {
					color: #FFF;
					font-size: 24rpx;
					font-weight: 400;
					display: block;
					margin-top: 15rpx;
				}
			}
	
			.shut_btns {
				width: 204rpx;
				height: 74rpx;
				text-align: center;
				line-height: 74rpx;
				border-radius: 56rpx;
				background: #53A87F;
				color: #FFF;
				font-size: 32rpx;
				font-weight: 400;
				margin-top: 15rpx;
			}
		}
	}
	
	.showImgs_mup {
		width: 100%;
		height: 226rpx;
		margin-left: -20rpx;
	
		&:nth-child(n+2) {
			margin-top: 20rpx;
		}
	}
</style>